summaryrefslogtreecommitdiff
path: root/src/pipe.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-03-13 12:34:55 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-03-13 12:34:55 +0100
commitc42343d3f027248514344aec9e3814dfe1047d59 (patch)
tree4d4713585b2407ebe4371b2b4cbe4d680eb9098a /src/pipe.cpp
parentdcb983699e52bf2e075baaeef250bcd3c82e4846 (diff)
pipe_t::rollback removes only unfinished message from the pipe rather than all unflushed messages
Diffstat (limited to 'src/pipe.cpp')
-rw-r--r--src/pipe.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pipe.cpp b/src/pipe.cpp
index 53dfb21..14a6ef4 100644
--- a/src/pipe.cpp
+++ b/src/pipe.cpp
@@ -170,6 +170,10 @@ void zmq::writer_t::rollback ()
zmq_msg_t msg;
while (pipe->unwrite (&msg)) {
+ if (!(msg.flags & ZMQ_MSG_TBC)) {
+ pipe->write (msg);
+ break;
+ }
zmq_msg_close (&msg);
msgs_written--;
}