mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-09 23:36:04 +00:00
LIBZMQ-541 issue fix
This commit is contained in:
parent
58b1082467
commit
4671108e57
13
src/dist.cpp
Normal file → Executable file
13
src/dist.cpp
Normal file → Executable file
@ -78,12 +78,19 @@ void zmq::dist_t::pipe_terminated (pipe_t *pipe_)
|
|||||||
{
|
{
|
||||||
// Remove the pipe from the list; adjust number of matching, active and/or
|
// Remove the pipe from the list; adjust number of matching, active and/or
|
||||||
// eligible pipes accordingly.
|
// eligible pipes accordingly.
|
||||||
if (pipes.index (pipe_) < matching)
|
if (pipes.index (pipe_) < matching) {
|
||||||
|
pipes.swap (pipes.index (pipe_), matching - 1);
|
||||||
matching--;
|
matching--;
|
||||||
if (pipes.index (pipe_) < active)
|
}
|
||||||
|
if (pipes.index (pipe_) < active) {
|
||||||
|
pipes.swap (pipes.index (pipe_), active - 1);
|
||||||
active--;
|
active--;
|
||||||
if (pipes.index (pipe_) < eligible)
|
}
|
||||||
|
if (pipes.index (pipe_) < eligible) {
|
||||||
|
pipes.swap (pipes.index (pipe_), eligible - 1);
|
||||||
eligible--;
|
eligible--;
|
||||||
|
}
|
||||||
|
|
||||||
pipes.erase (pipe_);
|
pipes.erase (pipe_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user