Commit 1cfee8d1 authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #601 from leewoosung/hotfixes/patched

[LIBZMQ-541] pub socket sending fail issue
parents 2a4aef92 4671108e
......@@ -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
// eligible pipes accordingly.
if (pipes.index (pipe_) < matching)
if (pipes.index (pipe_) < matching) {
pipes.swap (pipes.index (pipe_), matching - 1);
matching--;
if (pipes.index (pipe_) < active)
}
if (pipes.index (pipe_) < active) {
pipes.swap (pipes.index (pipe_), active - 1);
active--;
if (pipes.index (pipe_) < eligible)
}
if (pipes.index (pipe_) < eligible) {
pipes.swap (pipes.index (pipe_), eligible - 1);
eligible--;
}
pipes.erase (pipe_);
}
......
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