0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 15:41:05 +08:00

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.
This commit is contained in:
Martin Hurton 2010-06-17 12:45:14 +02:00
parent 9151de3895
commit 4777fe4010

View File

@ -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()) {