From cbaa7cfa93893876e4fd8794b6ea39f4d245b6b5 Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Mon, 23 Jan 2012 08:53:45 +0100 Subject: Imported Upstream version 2.1.6 --- src/fq.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/fq.cpp') diff --git a/src/fq.cpp b/src/fq.cpp index 36fd435..a1952d8 100644 --- a/src/fq.cpp +++ b/src/fq.cpp @@ -56,10 +56,9 @@ void zmq::fq_t::attach (reader_t *pipe_) void zmq::fq_t::terminated (reader_t *pipe_) { - // TODO: This is a problem with session-initiated termination. It breaks - // message atomicity. However, for socket initiated termination it's - // just fine. - zmq_assert (!more || pipes [current] != pipe_); + // Make sure that we are not closing current pipe while + // message is half-read. + zmq_assert (terminating || (!more || pipes [current] != pipe_)); // Remove the pipe from the list; adjust number of active pipes // accordingly. -- cgit v1.2.3