mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-17 16:43:58 +00:00
Merge pull request #112 from hintjens/master
Backported fix for libzmq-39
This commit is contained in:
commit
f5bc82d9a4
2
NEWS
2
NEWS
@ -1,6 +1,8 @@
|
||||
0MQ version 3.2.5 stable, released on 2014/xx/xx
|
||||
================================================
|
||||
|
||||
* LIBZMQ-39 Assertion failure "Bad file descriptor" during shutdown (rare)
|
||||
|
||||
|
||||
0MQ version 3.2.4 stable, released on 2013/09/20
|
||||
================================================
|
||||
|
@ -91,7 +91,6 @@ int zmq::ctx_t::terminate ()
|
||||
// restarted.
|
||||
bool restarted = terminating;
|
||||
terminating = true;
|
||||
slot_sync.unlock ();
|
||||
|
||||
// First attempt to terminate the context.
|
||||
if (!restarted) {
|
||||
@ -99,13 +98,12 @@ int zmq::ctx_t::terminate ()
|
||||
// First send stop command to sockets so that any blocking calls
|
||||
// can be interrupted. If there are no sockets we can ask reaper
|
||||
// thread to stop.
|
||||
slot_sync.lock ();
|
||||
for (sockets_t::size_type i = 0; i != sockets.size (); i++)
|
||||
sockets [i]->stop ();
|
||||
if (sockets.empty ())
|
||||
reaper->stop ();
|
||||
slot_sync.unlock ();
|
||||
}
|
||||
slot_sync.unlock();
|
||||
|
||||
// Wait till reaper thread closes all the sockets.
|
||||
command_t cmd;
|
||||
|
Loading…
x
Reference in New Issue
Block a user