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:
Ian Barber
2012-06-04 10:27:16 +01:00
parent 1566091bc6
commit c13f1d52ff
6 changed files with 8 additions and 46 deletions

View File

@@ -92,11 +92,6 @@ 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;
@@ -216,15 +211,6 @@ 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;
@@ -345,11 +331,6 @@ 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);