diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2010-09-07 15:49:54 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-09-07 15:49:54 +0200 |
commit | 6d4ffd90dbda943e5d1215fb56d06eeac1b4420f (patch) | |
tree | ae04c6143121e4990e066221daaed1bd3f038ecd /src/fq.cpp | |
parent | b4740c14e7fc68040037d65bdfac4233b08c5a08 (diff) |
Bug in fq_t and lb_t (when used via ZMQ_EVENTS option) fixed
Diffstat (limited to 'src/fq.cpp')
-rw-r--r-- | src/fq.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -148,8 +148,11 @@ bool zmq::fq_t::has_in () for (int count = active; count != 0; count--) { if (pipes [current]->check_read ()) return true; - current++; - if (current >= active) + + // Deactivate the pipe. + active--; + pipes.swap (current, active); + if (current == active) current = 0; } |