diff options
-rw-r--r-- | src/xrep.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xrep.cpp b/src/xrep.cpp index 15fac8d..77481c3 100644 --- a/src/xrep.cpp +++ b/src/xrep.cpp @@ -103,6 +103,8 @@ void zmq::xrep_t::terminated (reader_t *pipe_) if ((inpipes_t::size_type) (it - inpipes.begin ()) < current_in) current_in--; inpipes.erase (it); + if (current_in >= inpipes.size ()) + current_in = 0; if (terminating) unregister_term_ack (); return; |