diff --git a/src/ipc_connecter.cpp b/src/ipc_connecter.cpp index dc0ee216..58dccf46 100644 --- a/src/ipc_connecter.cpp +++ b/src/ipc_connecter.cpp @@ -135,6 +135,7 @@ void zmq::ipc_connecter_t::start_connecting () } // Handle any other error condition by eventual reconnect. + close (); wait = true; add_reconnect_timer(); } diff --git a/src/tcp_connecter.cpp b/src/tcp_connecter.cpp index 75079da5..042e82a7 100644 --- a/src/tcp_connecter.cpp +++ b/src/tcp_connecter.cpp @@ -146,6 +146,7 @@ void zmq::tcp_connecter_t::start_connecting () } // Handle any other error condition by eventual reconnect. + close (); wait = true; add_reconnect_timer(); }