mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-09 15:26:04 +00:00
Break early when pipe to be removed was found
This commit is contained in:
parent
f9770e93ef
commit
21345ffa50
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user