From 954d7f743dbc0c159794915c6deadc374dbf64d2 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 12 Oct 2010 17:55:09 +0200 Subject: Avoid duplicate creation of pipes for a single session When a session is being closed down its inbound and outbound pipe pointers are set to null. If (re) connection happens at that time, session may try to reinistantiate the pipes which is wrong. This patch allows session to attach pipes only once in its lifetime. Signed-off-by: Martin Sustrik --- src/session.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/session.hpp') diff --git a/src/session.hpp b/src/session.hpp index d4b6ad9..7e528de 100644 --- a/src/session.hpp +++ b/src/session.hpp @@ -117,6 +117,9 @@ namespace zmq // the engines into the same thread. class io_thread_t *io_thread; + // If true, pipes were already attached to this session. + bool pipes_attached; + // If true, delimiter was already read from the inbound pipe. bool delimiter_processed; -- cgit v1.2.3