From 6815138501b9f2a69e807bc3527d93583e633233 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Fri, 15 May 2020 17:07:48 +0100 Subject: [PATCH] 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. --- src/pipe.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pipe.cpp b/src/pipe.cpp index 69d5e4f6..b391b6ea 100644 --- a/src/pipe.cpp +++ b/src/pipe.cpp @@ -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;