summaryrefslogtreecommitdiff
path: root/src/fq.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-09-01 07:35:15 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-09-01 07:35:15 +0200
commit47c064f2eaa01c324e06588a4f07892762e78fcd (patch)
tree36cda4840cfe3c863b267aad91d8b0c6b3437009 /src/fq.cpp
parent090e460d6f09b5611d34a4867efb6cf46dd44a34 (diff)
hangup when closing socket with no pipes attached -- fixed
Diffstat (limited to 'src/fq.cpp')
-rw-r--r--src/fq.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fq.cpp b/src/fq.cpp
index 5673796..7eef564 100644
--- a/src/fq.cpp
+++ b/src/fq.cpp
@@ -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 ();
}