summaryrefslogtreecommitdiff
path: root/src/session.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-10-12 17:55:09 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-10-12 17:55:09 +0200
commit954d7f743dbc0c159794915c6deadc374dbf64d2 (patch)
tree240c501ba3c6d6e6b10693fe13dac6dddbb033a8 /src/session.hpp
parentc6d74e0a0345cae2c09c6fb29911159331c93e64 (diff)
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 <sustrik@250bpm.com>
Diffstat (limited to 'src/session.hpp')
-rw-r--r--src/session.hpp3
1 files changed, 3 insertions, 0 deletions
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;