mirror of
https://github.com/zeromq/libzmq.git
synced 2025-09-27 16:29:34 +02:00
pipe_t::rollback removes only unfinished message from the pipe rather than all unflushed messages
This commit is contained in:
parent
dcb983699e
commit
c42343d3f0
@ -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--;
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ namespace zmq
|
||||
// message cannot be written because high watermark was reached.
|
||||
bool write (zmq_msg_t *msg_);
|
||||
|
||||
// Remove any unflushed messages from the pipe.
|
||||
// Remove unfinished part of a message from the pipe.
|
||||
void rollback ();
|
||||
|
||||
// Flush the messages downsteam.
|
||||
|
Loading…
x
Reference in New Issue
Block a user