Commit 919bd962 authored by Martin Hurton's avatar Martin Hurton

{tcp|ipc}_connecter: check whether socket is valid before closing it

Calling close () when the underlying socket is invalid
triggers an assertion failure.
parent ec9f8994
......@@ -154,6 +154,7 @@ void zmq::ipc_connecter_t::start_connecting ()
// Handle any other error condition by eventual reconnect.
else {
if (s != retired_fd)
close ();
add_reconnect_timer ();
}
......
......@@ -167,6 +167,7 @@ void zmq::tcp_connecter_t::start_connecting ()
// Handle any other error condition by eventual reconnect.
else {
if (s != retired_fd)
close ();
add_reconnect_timer ();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment