From 47c064f2eaa01c324e06588a4f07892762e78fcd Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Wed, 1 Sep 2010 07:35:15 +0200 Subject: hangup when closing socket with no pipes attached -- fixed --- src/fq.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/fq.cpp') 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 (); } -- cgit v1.2.3