mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-28 07:58:14 +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:
parent
9151de3895
commit
4777fe4010
@ -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()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user