summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Hurton <hurtonm@gmail.com>2010-06-17 12:45:14 +0200
committerMartin Hurton <hurtonm@gmail.com>2010-06-17 13:00:30 +0200
commit4777fe4010572d381a2ad8eb63df2fc5fb7e6642 (patch)
tree0f2402fb1813bc2c2965e1c9af9729e007d9c561
parent9151de38959a21829d4ab60324d6750d2e1a4357 (diff)
pipe: fix bug in rollback() method
The msgs_written variable keeps track how many complete messages have been written so far. The rollback operation drops all fragments of the last incomplete message so it shouldn't change this variable at all.
-rw-r--r--src/pipe.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/pipe.cpp b/src/pipe.cpp
index 1df64e9..d62085d 100644
--- a/src/pipe.cpp
+++ b/src/pipe.cpp
@@ -176,7 +176,6 @@ void zmq::writer_t::rollback ()
while (pipe->unwrite (&msg)) {
zmq_assert (msg.flags & ZMQ_MSG_MORE);
zmq_msg_close (&msg);
- msgs_written--;
}
if (stalled && endpoint != NULL && !pipe_full()) {