0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-15 18:38:00 +08:00

Fixed iterator when erasing from inprocs multimap

This commit is contained in:
Stefan Radomski 2012-12-04 17:32:38 +01:00
parent 1965e2d05d
commit fbfd3c34d9

View File

@ -1012,7 +1012,8 @@ void zmq::socket_base_t::terminated (pipe_t *pipe_)
xterminated (pipe_);
// Remove pipe from inproc pipes
for (inprocs_t::iterator it = inprocs.begin(); it != inprocs.end(); ++it) {
inprocs_t::iterator it = inprocs.begin();
while (it != inprocs.end()) {
if (it->second == pipe_) {
inprocs.erase(it++);
} else {