Commit 80aef8df authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #459 from hurtonm/issue_459

Resolve LIBZMQ-459
parents 13489242 41dc2e60
......@@ -263,8 +263,15 @@ void zmq::stream_engine_t::out_event ()
// If write buffer is empty, try to read new data from the encoder.
if (!outsize) {
// Even when we stop polling as soon as there is no
// data to send, the poller may invoke out_event one
// more time due to 'speculative write' optimisation.
if (unlikely (encoder == NULL)) {
zmq_assert (handshaking);
return;
}
outpos = NULL;
zmq_assert (encoder);
encoder->get_data (&outpos, &outsize);
// If there is no data to send, stop polling for output.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment