urrent pipe pointer in XREP out of range -- fixed.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
Martin Sustrik 2011-05-06 15:51:56 +02:00
parent 3ef7c747ac
commit 0c5b781e97

View File

@ -103,6 +103,8 @@ void zmq::xrep_t::terminated (reader_t *pipe_)
if ((inpipes_t::size_type) (it - inpipes.begin ()) < current_in) if ((inpipes_t::size_type) (it - inpipes.begin ()) < current_in)
current_in--; current_in--;
inpipes.erase (it); inpipes.erase (it);
if (current_in >= inpipes.size ())
current_in = 0;
if (terminating) if (terminating)
unregister_term_ack (); unregister_term_ack ();
return; return;