Commit 0bb76b66 authored by Martin Sustrik's avatar Martin Sustrik

assert when xrep socket gets reconnected in the middle of the shutdown -- fixed

parent ac9b05c3
......@@ -50,7 +50,7 @@ zmq::xrep_t::~xrep_t ()
void zmq::xrep_t::xattach_pipes (reader_t *inpipe_, writer_t *outpipe_,
const blob_t &peer_identity_)
{
zmq_assert (inpipe_ && outpipe_);
if (outpipe_) {
outpipe_->set_event_sink (this);
......@@ -60,6 +60,14 @@ void zmq::xrep_t::xattach_pipes (reader_t *inpipe_, writer_t *outpipe_,
peer_identity_, outpipe)).second;
zmq_assert (ok);
if (terminating) {
register_term_acks (1);
outpipe_->terminate ();
}
}
if (inpipe_) {
inpipe_->set_event_sink (this);
inpipe_t inpipe = {inpipe_, peer_identity_, true};
......@@ -69,6 +77,7 @@ void zmq::xrep_t::xattach_pipes (reader_t *inpipe_, writer_t *outpipe_,
register_term_acks (1);
inpipe_->terminate ();
}
}
}
void zmq::xrep_t::process_term ()
......
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