diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2010-09-01 07:35:15 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-09-01 07:35:15 +0200 |
commit | 47c064f2eaa01c324e06588a4f07892762e78fcd (patch) | |
tree | 36cda4840cfe3c863b267aad91d8b0c6b3437009 | |
parent | 090e460d6f09b5611d34a4867efb6cf46dd44a34 (diff) |
hangup when closing socket with no pipes attached -- fixed
-rw-r--r-- | src/fq.cpp | 5 | ||||
-rw-r--r-- | src/lb.cpp | 5 |
2 files changed, 10 insertions, 0 deletions
@@ -75,6 +75,11 @@ void zmq::fq_t::terminate () { terminating = true; + if (pipes.empty ()) { + sink->terminated (); + return; + } + for (pipes_t::size_type i = 0; i != pipes.size (); i++) pipes [i]->terminate (); } @@ -54,6 +54,11 @@ void zmq::lb_t::terminate () { terminating = true; + if (pipes.empty ()) { + sink->terminated (); + return; + } + for (pipes_t::size_type i = 0; i != pipes.size (); i++) pipes [i]->terminate (); } |