From 1a2022fedc0e738d01477bbc2fdef5aef7c7a178 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. (cherry picked from commit 6815138501b9f2a69e807bc3527d93583e633233) Conflicts: src/pipe.cpp --- src/pipe.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pipe.cpp b/src/pipe.cpp index e588215e..37935c7a 100644 --- a/src/pipe.cpp +++ b/src/pipe.cpp @@ -470,6 +470,7 @@ void zmq::pipe_t::process_delimiter () if (state == active) state = delimiter_received; else { + rollback (); outpipe = NULL; send_pipe_term_ack (peer); state = term_ack_sent;