Commit 10fbc78e authored by Martin Sustrik's avatar Martin Sustrik

Assert during SUB socket termination fixed.

Fair queueing algorithm was checking whether the current pipe
is not closed in the middle of reading a multipart message.
However, this is OK when the socket is closing down.
Signed-off-by: 's avatarMartin Sustrik <sustrik@250bpm.com>
parent e0246e32
...@@ -55,10 +55,9 @@ void zmq::fq_t::attach (reader_t *pipe_) ...@@ -55,10 +55,9 @@ void zmq::fq_t::attach (reader_t *pipe_)
void zmq::fq_t::terminated (reader_t *pipe_) void zmq::fq_t::terminated (reader_t *pipe_)
{ {
// TODO: This is a problem with session-initiated termination. It breaks // Make sure that we are not closing current pipe while
// message atomicity. However, for socket initiated termination it's // message is half-read.
// just fine. zmq_assert (terminating || (!more || pipes [current] != pipe_));
zmq_assert (!more || pipes [current] != pipe_);
// Remove the pipe from the list; adjust number of active pipes // Remove the pipe from the list; adjust number of active pipes
// accordingly. // accordingly.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment