mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-26 18:42:43 +01:00
@@ -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 write buffer is empty, try to read new data from the encoder.
|
||||||
if (!outsize) {
|
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;
|
outpos = NULL;
|
||||||
zmq_assert (encoder);
|
|
||||||
encoder->get_data (&outpos, &outsize);
|
encoder->get_data (&outpos, &outsize);
|
||||||
|
|
||||||
// If there is no data to send, stop polling for output.
|
// If there is no data to send, stop polling for output.
|
||||||
|
|||||||
Reference in New Issue
Block a user