rpc : throw an exception when the RPC endpoint is unreachable
Returning nullptr in this case leads to obscure crashes, better fail fast
This commit is contained in:
parent
172c825684
commit
3cd9404cc0
1 changed files with 1 additions and 1 deletions
|
@ -671,7 +671,7 @@ GGML_API GGML_CALL ggml_backend_buffer_type_t ggml_backend_rpc_buffer_type(const
|
||||||
}
|
}
|
||||||
auto sock = get_socket(endpoint);
|
auto sock = get_socket(endpoint);
|
||||||
if (sock == nullptr) {
|
if (sock == nullptr) {
|
||||||
return nullptr;
|
throw std::runtime_error("Failed to connect to " + std::string(endpoint));
|
||||||
}
|
}
|
||||||
size_t alignment = get_alignment(sock);
|
size_t alignment = get_alignment(sock);
|
||||||
size_t max_size = get_max_size(sock);
|
size_t max_size = get_max_size(sock);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue