mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-31 01:43:02 +08:00
pipe being attached to the PAIR socket during its termination process is immediately asked to terminate itself
This commit is contained in:
parent
47c064f2ea
commit
aaa07613d3
@ -44,7 +44,6 @@ zmq::pair_t::~pair_t ()
|
||||
void zmq::pair_t::xattach_pipes (class reader_t *inpipe_,
|
||||
class writer_t *outpipe_, const blob_t &peer_identity_)
|
||||
{
|
||||
zmq_assert (!terminating);
|
||||
zmq_assert (!inpipe && !outpipe);
|
||||
|
||||
inpipe = inpipe_;
|
||||
@ -54,6 +53,12 @@ void zmq::pair_t::xattach_pipes (class reader_t *inpipe_,
|
||||
outpipe = outpipe_;
|
||||
outpipe_alive = true;
|
||||
outpipe->set_event_sink (this);
|
||||
|
||||
if (terminating) {
|
||||
register_term_acks (2);
|
||||
inpipe_->terminate ();
|
||||
outpipe_->terminate ();
|
||||
}
|
||||
}
|
||||
|
||||
void zmq::pair_t::terminated (class reader_t *pipe_)
|
||||
|
Loading…
x
Reference in New Issue
Block a user