mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-31 01:43:02 +08:00
potential duplicate termination of pipes removed
This commit is contained in:
parent
c7b9ba3ccd
commit
0c215fada4
@ -73,6 +73,7 @@ void zmq::fq_t::terminated (reader_t *pipe_)
|
||||
|
||||
void zmq::fq_t::terminate ()
|
||||
{
|
||||
zmq_assert (!terminating);
|
||||
terminating = true;
|
||||
|
||||
if (pipes.empty ()) {
|
||||
|
@ -52,6 +52,7 @@ void zmq::lb_t::attach (writer_t *pipe_)
|
||||
|
||||
void zmq::lb_t::terminate ()
|
||||
{
|
||||
zmq_assert (!terminating);
|
||||
terminating = true;
|
||||
|
||||
if (pipes.empty ()) {
|
||||
|
@ -703,16 +703,6 @@ void zmq::socket_base_t::process_stop ()
|
||||
void zmq::socket_base_t::process_bind (reader_t *in_pipe_, writer_t *out_pipe_,
|
||||
const blob_t &peer_identity_)
|
||||
{
|
||||
// If the socket is already being shut down, the termination process on
|
||||
// the new pipes is started immediately. However, they are still attached
|
||||
// as to let the process finish in a decent manner.
|
||||
if (unlikely (zombie)) {
|
||||
if (in_pipe_)
|
||||
in_pipe_->terminate ();
|
||||
if (out_pipe_)
|
||||
out_pipe_->terminate ();
|
||||
}
|
||||
|
||||
attach_pipes (in_pipe_, out_pipe_, peer_identity_);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user