summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-06-19 12:48:36 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-06-19 12:48:36 +0200
commit9f4d3767fed58ddfa52f63692c6169bfdbcec2e3 (patch)
treec35c594a61052ffbc06e9e8962febbe391185867 /src
parent00dc0245e6aacbff247c84ac8480d3ddcabacd5a (diff)
Session termination error fixed
When session is already terminating and reconnection happens at that point, the session should not create new pipe to its socket. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src')
-rw-r--r--src/session.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/session.cpp b/src/session.cpp
index 8f29248..e700313 100644
--- a/src/session.cpp
+++ b/src/session.cpp
@@ -56,6 +56,7 @@ zmq::session_t::~session_t ()
void zmq::session_t::attach_pipe (pipe_t *pipe_)
{
+ zmq_assert (!is_terminating ());
zmq_assert (!pipe);
zmq_assert (pipe_);
pipe = pipe_;
@@ -175,7 +176,7 @@ void zmq::session_t::process_attach (i_engine *engine_,
}
// Create the pipe if it does not exist yet.
- if (!pipe) {
+ if (!pipe && !is_terminating ()) {
object_t *parents [2] = {this, socket};
pipe_t *pipes [2] = {NULL, NULL};
int hwms [2] = {options.rcvhwm, options.sndhwm};