Commit 21345ffa authored by Stefan Radomski's avatar Stefan Radomski

Break early when pipe to be removed was found

parent f9770e93
...@@ -1011,12 +1011,10 @@ void zmq::socket_base_t::terminated (pipe_t *pipe_) ...@@ -1011,12 +1011,10 @@ void zmq::socket_base_t::terminated (pipe_t *pipe_)
xterminated (pipe_); xterminated (pipe_);
// Remove pipe from inproc pipes // Remove pipe from inproc pipes
inprocs_t::iterator it = inprocs.begin(); for (inprocs_t::iterator it = inprocs.begin(); it != inprocs.end(); ++it) {
while (it != inprocs.end()) {
if (it->second == pipe_) { if (it->second == pipe_) {
inprocs.erase(it++); inprocs.erase(it);
} else { break;
it++;
} }
} }
......
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