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_)
xterminated (pipe_);
// Remove pipe from inproc pipes
inprocs_t::iterator it = inprocs.begin();
while (it != inprocs.end()) {
for (inprocs_t::iterator it = inprocs.begin(); it != inprocs.end(); ++it) {
if (it->second == pipe_) {
inprocs.erase(it++);
} else {
it++;
inprocs.erase(it);
break;
}
}
......
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