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:
Luca Boccassi 2020-05-15 17:07:48 +01:00
parent 6439d32254
commit 6815138501

View File

@ -506,6 +506,7 @@ void zmq::pipe_t::process_delimiter ()
if (_state == active)
_state = delimiter_received;
else {
rollback ();
_out_pipe = NULL;
send_pipe_term_ack (_peer);
_state = term_ack_sent;