0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-29 00:32:34 +08:00

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

Calling close () when the underlying socket is invalid
triggers an assertion failure.
This commit is contained in:
Martin Hurton 2012-06-15 02:12:26 +02:00
parent ec9f8994a7
commit 919bd9628d
2 changed files with 4 additions and 2 deletions

View File

@ -154,7 +154,8 @@ void zmq::ipc_connecter_t::start_connecting ()
// Handle any other error condition by eventual reconnect.
else {
close ();
if (s != retired_fd)
close ();
add_reconnect_timer ();
}
}

View File

@ -167,7 +167,8 @@ void zmq::tcp_connecter_t::start_connecting ()
// Handle any other error condition by eventual reconnect.
else {
close ();
if (s != retired_fd)
close ();
add_reconnect_timer ();
}
}