summaryrefslogtreecommitdiff
path: root/src/fq.cpp
diff options
context:
space:
mode:
authorMartin Lucina <martin@lucina.net>2012-01-23 08:53:45 +0100
committerMartin Lucina <martin@lucina.net>2012-01-23 08:53:45 +0100
commitcbaa7cfa93893876e4fd8794b6ea39f4d245b6b5 (patch)
treee15fcee68b93793ef5654e09c214150e9d3ce248 /src/fq.cpp
parent8e61b98c5e2943b149c825310b24e714a6127072 (diff)
Imported Upstream version 2.1.6upstream/2.1.6
Diffstat (limited to 'src/fq.cpp')
-rw-r--r--src/fq.cpp7
1 files changed, 3 insertions, 4 deletions
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.