mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-17 11:05:06 +02:00
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 commit is contained in:
@@ -411,11 +411,14 @@ void zmq::session_base_t::detached ()
|
||||
// the socket object to resend all the subscriptions.
|
||||
if (pipe && (options.type == ZMQ_SUB || options.type == ZMQ_XSUB))
|
||||
pipe->hiccup ();
|
||||
|
||||
// For delayed connect situations, hiccup the socket to have it
|
||||
// pause usage of this pipe
|
||||
if (outpipe && options.delay_attach_on_connect == 1)
|
||||
send_detach(socket, outpipe);
|
||||
|
||||
// For delayed connect situations, terminate the pipe
|
||||
// and reestablish later on
|
||||
if (pipe && options.delay_attach_on_connect == 1) {
|
||||
pipe->terminate (false);
|
||||
socket->terminated (pipe);
|
||||
pipe = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void zmq::session_base_t::start_connecting (bool wait_)
|
||||
|
Reference in New Issue
Block a user