mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-21 10:05:04 +01:00
Bug in fq_t and lb_t (when used via ZMQ_EVENTS option) fixed
This commit is contained in:
parent
b4740c14e7
commit
6d4ffd90db
@ -148,8 +148,11 @@ bool zmq::fq_t::has_in ()
|
|||||||
for (int count = active; count != 0; count--) {
|
for (int count = active; count != 0; count--) {
|
||||||
if (pipes [current]->check_read ())
|
if (pipes [current]->check_read ())
|
||||||
return true;
|
return true;
|
||||||
current++;
|
|
||||||
if (current >= active)
|
// Deactivate the pipe.
|
||||||
|
active--;
|
||||||
|
pipes.swap (current, active);
|
||||||
|
if (current == active)
|
||||||
current = 0;
|
current = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,10 +135,10 @@ bool zmq::lb_t::has_out ()
|
|||||||
if (pipes [current]->check_write ())
|
if (pipes [current]->check_write ())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// Deactivate the pipe.
|
||||||
active--;
|
active--;
|
||||||
if (current < active)
|
pipes.swap (current, active);
|
||||||
pipes.swap (current, active);
|
if (current == active)
|
||||||
else
|
|
||||||
current = 0;
|
current = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user