Permalink
Browse files

A synchronous connect() failure in ipc_connecter can result in Assertion

failed: s == retired_fd (ipc_connecter.cpp:174), as reported in LIBZMQ-294.

This patch fixes the bug, and also an identical problem in tcp_connecter
which has not hit people since TCP connect() usually completes via the
asynchronous code path (poll, out_event).

Signed-off-by: Martin Lucina <martin@lucina.net>
  • Loading branch information...
1 parent e7d748e commit a9e03336b020d2e6a83338b111092e65aa812f95 @mato mato committed with sustrik Dec 15, 2011
Showing with 2 additions and 0 deletions.
  1. +1 −0 src/ipc_connecter.cpp
  2. +1 −0 src/tcp_connecter.cpp
View
@@ -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();
}
View
@@ -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();
}

0 comments on commit a9e0333

Please sign in to comment.