Skip to content

Commit

Permalink
A synchronous connect() failure in ipc_connecter can result in Assertion
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mato authored and sustrik committed Dec 15, 2011
1 parent e7d748e commit a9e0333
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ipc_connecter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
1 change: 1 addition & 0 deletions src/tcp_connecter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit a9e0333

Please sign in to comment.