mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-14 19:13:52 +01:00
Fix pipe writer termination
Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
This commit is contained in:
parent
8e0049e2fb
commit
babdf48aac
@ -275,6 +275,7 @@ void zmq::writer_t::terminate ()
|
||||
// Prevent double termination.
|
||||
if (terminating)
|
||||
return;
|
||||
terminating = true;
|
||||
|
||||
// Mark the pipe as not available for writing.
|
||||
active = false;
|
||||
@ -339,7 +340,7 @@ void zmq::writer_t::process_activate_writer (uint64_t msgs_read_)
|
||||
|
||||
// If the writer was non-active before, let's make it active
|
||||
// (available for writing messages to).
|
||||
if (!active) {
|
||||
if (!active && !terminating) {
|
||||
active = true;
|
||||
zmq_assert (sink);
|
||||
sink->activated (this);
|
||||
|
Loading…
Reference in New Issue
Block a user