summaryrefslogtreecommitdiff
path: root/src/lb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lb.cpp')
-rw-r--r--src/lb.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lb.cpp b/src/lb.cpp
index a784013..5e29ef4 100644
--- a/src/lb.cpp
+++ b/src/lb.cpp
@@ -128,8 +128,15 @@ bool zmq::lb_t::has_out ()
return true;
while (active > 0) {
- if (pipes [current]->check_write ())
+
+ // Check whether zero-sized message can be written to the pipe.
+ zmq_msg_t msg;
+ zmq_msg_init (&msg);
+ if (pipes [current]->check_write (&msg)) {
+ zmq_msg_close (&msg);
return true;
+ }
+ zmq_msg_close (&msg);
// Deactivate the pipe.
active--;