mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-13 01:31:20 +00:00
Problem: unfinished message can be leaked by client pipe
When a pipe processes a delimiter and is already not in active state but still has an unfinished message, the message is leaked. Solution: issue a rollback before losing the reference to the pipe.
This commit is contained in:
parent
6439d32254
commit
6815138501
@ -506,6 +506,7 @@ void zmq::pipe_t::process_delimiter ()
|
|||||||
if (_state == active)
|
if (_state == active)
|
||||||
_state = delimiter_received;
|
_state = delimiter_received;
|
||||||
else {
|
else {
|
||||||
|
rollback ();
|
||||||
_out_pipe = NULL;
|
_out_pipe = NULL;
|
||||||
send_pipe_term_ack (_peer);
|
send_pipe_term_ack (_peer);
|
||||||
_state = term_ack_sent;
|
_state = term_ack_sent;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user