mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-27 19:10:22 +01:00
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:
@@ -92,6 +92,11 @@ void zmq::object_t::process_command (command_t &cmd_)
|
||||
process_seqnum ();
|
||||
break;
|
||||
|
||||
case command_t::detach:
|
||||
process_detach (cmd_.args.detach.pipe);
|
||||
process_seqnum ();
|
||||
break;
|
||||
|
||||
case command_t::hiccup:
|
||||
process_hiccup (cmd_.args.hiccup.pipe);
|
||||
break;
|
||||
@@ -211,6 +216,15 @@ void zmq::object_t::send_bind (own_t *destination_, pipe_t *pipe_,
|
||||
send_command (cmd);
|
||||
}
|
||||
|
||||
void zmq::object_t::send_detach (own_t *destination_, pipe_t *pipe_)
|
||||
{
|
||||
command_t cmd;
|
||||
cmd.destination = destination_;
|
||||
cmd.type = command_t::detach;
|
||||
cmd.args.detach.pipe = pipe_;
|
||||
send_command (cmd);
|
||||
}
|
||||
|
||||
void zmq::object_t::send_activate_read (pipe_t *destination_)
|
||||
{
|
||||
command_t cmd;
|
||||
@@ -331,6 +345,11 @@ void zmq::object_t::process_bind (pipe_t *pipe_)
|
||||
zmq_assert (false);
|
||||
}
|
||||
|
||||
void zmq::object_t::process_detach (pipe_t *pipe_)
|
||||
{
|
||||
zmq_assert (false);
|
||||
}
|
||||
|
||||
void zmq::object_t::process_activate_read ()
|
||||
{
|
||||
zmq_assert (false);
|
||||
|
||||
Reference in New Issue
Block a user