mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-09 15:26:04 +00:00
Merge pull request #1881 from camachat/master
Fixes #1419 segfault when using a XSUB/XPUB proxy.
This commit is contained in:
commit
0feec7a72e
@ -124,12 +124,14 @@ void zmq::dist_t::pipe_terminated (pipe_t *pipe_)
|
|||||||
void zmq::dist_t::activated (pipe_t *pipe_)
|
void zmq::dist_t::activated (pipe_t *pipe_)
|
||||||
{
|
{
|
||||||
// Move the pipe from passive to eligible state.
|
// Move the pipe from passive to eligible state.
|
||||||
pipes.swap (pipes.index (pipe_), eligible);
|
if (eligible < pipes.size ()) {
|
||||||
eligible++;
|
pipes.swap (pipes.index (pipe_), eligible);
|
||||||
|
eligible++;
|
||||||
|
}
|
||||||
|
|
||||||
// If there's no message being sent at the moment, move it to
|
// If there's no message being sent at the moment, move it to
|
||||||
// the active state.
|
// the active state.
|
||||||
if (!more) {
|
if (!more && active < pipes.size ()) {
|
||||||
pipes.swap (eligible - 1, active);
|
pipes.swap (eligible - 1, active);
|
||||||
active++;
|
active++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user