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:
Luca Boccassi 2020-05-15 17:07:48 +01:00
parent c568258763
commit 6e5f33579d

View File

@ -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;