diff options
author | Mikko Koppanen <mkoppanen@php.net> | 2010-12-15 20:10:27 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-12-15 20:10:27 +0100 |
commit | 27e83cc5258e191a7d5977e202046447df7896b9 (patch) | |
tree | 57572817c9a7e135624f29cae7cbadcce490be88 /src/lb.cpp | |
parent | a46980babe076d34347629a54e9635466e6e2a9f (diff) |
Fixes assertion on pipe.cpp:237 when swap fills up.
Fixes swap::full () functionality
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
Diffstat (limited to 'src/lb.cpp')
-rw-r--r-- | src/lb.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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--; |