Commit 47c064f2 authored by Martin Sustrik's avatar Martin Sustrik

hangup when closing socket with no pipes attached -- fixed

parent 090e460d
...@@ -75,6 +75,11 @@ void zmq::fq_t::terminate () ...@@ -75,6 +75,11 @@ void zmq::fq_t::terminate ()
{ {
terminating = true; terminating = true;
if (pipes.empty ()) {
sink->terminated ();
return;
}
for (pipes_t::size_type i = 0; i != pipes.size (); i++) for (pipes_t::size_type i = 0; i != pipes.size (); i++)
pipes [i]->terminate (); pipes [i]->terminate ();
} }
......
...@@ -54,6 +54,11 @@ void zmq::lb_t::terminate () ...@@ -54,6 +54,11 @@ void zmq::lb_t::terminate ()
{ {
terminating = true; terminating = true;
if (pipes.empty ()) {
sink->terminated ();
return;
}
for (pipes_t::size_type i = 0; i != pipes.size (); i++) for (pipes_t::size_type i = 0; i != pipes.size (); i++)
pipes [i]->terminate (); pipes [i]->terminate ();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment