mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-17 08:34:00 +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. (cherry picked from commit 6815138501b9f2a69e807bc3527d93583e633233) Conflicts: src/pipe.cpp
This commit is contained in:
parent
c568258763
commit
6e5f33579d
@ -451,6 +451,7 @@ void zmq::pipe_t::process_delimiter ()
|
|||||||
if (state == active)
|
if (state == active)
|
||||||
state = delimiter_received;
|
state = delimiter_received;
|
||||||
else {
|
else {
|
||||||
|
rollback ();
|
||||||
outpipe = NULL;
|
outpipe = 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