summaryrefslogtreecommitdiff
path: root/src/lb.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-09-07 15:49:54 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-09-07 15:49:54 +0200
commit6d4ffd90dbda943e5d1215fb56d06eeac1b4420f (patch)
treeae04c6143121e4990e066221daaed1bd3f038ecd /src/lb.cpp
parentb4740c14e7fc68040037d65bdfac4233b08c5a08 (diff)
Bug in fq_t and lb_t (when used via ZMQ_EVENTS option) fixed
Diffstat (limited to 'src/lb.cpp')
-rw-r--r--src/lb.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lb.cpp b/src/lb.cpp
index 53f8f58..7a28d47 100644
--- a/src/lb.cpp
+++ b/src/lb.cpp
@@ -135,10 +135,10 @@ bool zmq::lb_t::has_out ()
if (pipes [current]->check_write ())
return true;
+ // Deactivate the pipe.
active--;
- if (current < active)
- pipes.swap (current, active);
- else
+ pipes.swap (current, active);
+ if (current == active)
current = 0;
}