Revert "On the advice of Martin Hurton, removed the new command type and just terminated the pipe in a reconnect situation, and notified the socket of the same. This handles the blocking properly, but at the cost of potentially losing in flight messages. However, this is a reasonable trade off given how much simpler it makes the patch."

This reverts commit c13f1d52ff.
This commit is contained in:
Ian Barber
2012-06-12 14:50:50 +01:00
parent b020bd4ba8
commit f0920caf02
6 changed files with 46 additions and 8 deletions

View File

@@ -876,6 +876,17 @@ void zmq::socket_base_t::process_destroy ()
destroyed = true;
}
void zmq::socket_base_t::process_detach (pipe_t *pipe_)
{
// If we are blocking connecting threads, drop this one
if (options.delay_attach_on_connect == 1) {
zmq_assert (pipe_);
pipes.erase (pipe_);
// Let derived sockets know we're ditching this pipe
xterminated (pipe_);
}
}
int zmq::socket_base_t::xsetsockopt (int option_, const void *optval_,
size_t optvallen_)
{