mirror of https://github.com/oxen-io/oxen-mq.git
Wrap HI response in try/catch
It's possible that the client has gone away, in which case we can get an exception raised from an unroutable request.
This commit is contained in:
parent
3be632e73e
commit
1ad68b2605
|
@ -1332,7 +1332,9 @@ bool LokiMQ::proxy_handle_builtin(size_t conn_index, std::vector<zmq::message_t>
|
|||
return true;
|
||||
}
|
||||
LMQ_LOG(info, "Incoming client from ", peer_address(parts.back()), " sent HI, replying with HELLO");
|
||||
send_routed_message(connections[conn_index], std::string{route}, "HELLO");
|
||||
try {
|
||||
send_routed_message(connections[conn_index], std::string{route}, "HELLO");
|
||||
} catch (const std::exception &e) { LMQ_LOG(warn, "Couldn't reply with HELLO: ", e.what()); }
|
||||
return true;
|
||||
} else if (cmd == "HELLO") {
|
||||
if (!outgoing) {
|
||||
|
|
Loading…
Reference in New Issue