mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-17 16:43:58 +00:00
Break early when pipe to be removed was found
This commit is contained in:
parent
fbfd3c34d9
commit
2131e85cd7
@ -1012,12 +1012,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++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user