summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-09-18 06:42:46 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-09-18 06:42:46 +0200
commit0c215fada4f448788069e42bda34609f74c8b64b (patch)
tree817c28cb2a6046ac3574c7097230b0d9386d8381 /src
parentc7b9ba3ccdd5a18afb22dda1afee16c938076c25 (diff)
potential duplicate termination of pipes removed
Diffstat (limited to 'src')
-rw-r--r--src/fq.cpp1
-rw-r--r--src/lb.cpp1
-rw-r--r--src/socket_base.cpp10
3 files changed, 2 insertions, 10 deletions
diff --git a/src/fq.cpp b/src/fq.cpp
index 9832c21..ad70633 100644
--- a/src/fq.cpp
+++ b/src/fq.cpp
@@ -73,6 +73,7 @@ void zmq::fq_t::terminated (reader_t *pipe_)
void zmq::fq_t::terminate ()
{
+ zmq_assert (!terminating);
terminating = true;
if (pipes.empty ()) {
diff --git a/src/lb.cpp b/src/lb.cpp
index e0c2c04..7b3339c 100644
--- a/src/lb.cpp
+++ b/src/lb.cpp
@@ -52,6 +52,7 @@ void zmq::lb_t::attach (writer_t *pipe_)
void zmq::lb_t::terminate ()
{
+ zmq_assert (!terminating);
terminating = true;
if (pipes.empty ()) {
diff --git a/src/socket_base.cpp b/src/socket_base.cpp
index 288a627..621f2f5 100644
--- a/src/socket_base.cpp
+++ b/src/socket_base.cpp
@@ -703,16 +703,6 @@ void zmq::socket_base_t::process_stop ()
void zmq::socket_base_t::process_bind (reader_t *in_pipe_, writer_t *out_pipe_,
const blob_t &peer_identity_)
{
- // If the socket is already being shut down, the termination process on
- // the new pipes is started immediately. However, they are still attached
- // as to let the process finish in a decent manner.
- if (unlikely (zombie)) {
- if (in_pipe_)
- in_pipe_->terminate ();
- if (out_pipe_)
- out_pipe_->terminate ();
- }
-
attach_pipes (in_pipe_, out_pipe_, peer_identity_);
}