mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-15 15:16:52 +02: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:
@@ -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 ();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user