mirror of
https://github.com/zeromq/libzmq.git
synced 2025-07-01 08:23:32 +02:00
Merge branch 'libzmq-205' of git://git.lucina.net/libzmq
This commit is contained in:
commit
c54ad48c9b
@ -117,8 +117,15 @@ void zmq::pgm_receiver_t::activate_in ()
|
|||||||
// processed the whole buffer but failed to write
|
// processed the whole buffer but failed to write
|
||||||
// the last message into the pipe.
|
// the last message into the pipe.
|
||||||
if (pending_bytes == 0) {
|
if (pending_bytes == 0) {
|
||||||
if (mru_decoder != NULL)
|
if (mru_decoder != NULL) {
|
||||||
mru_decoder->process_buffer (NULL, 0);
|
mru_decoder->process_buffer (NULL, 0);
|
||||||
|
session->flush ();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resume polling.
|
||||||
|
set_pollin (pipe_handle);
|
||||||
|
set_pollin (socket_handle);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,6 +135,7 @@ void zmq::pgm_receiver_t::activate_in ()
|
|||||||
// Ask the decoder to process remaining data.
|
// Ask the decoder to process remaining data.
|
||||||
size_t n = mru_decoder->process_buffer (pending_ptr, pending_bytes);
|
size_t n = mru_decoder->process_buffer (pending_ptr, pending_bytes);
|
||||||
pending_bytes -= n;
|
pending_bytes -= n;
|
||||||
|
session->flush ();
|
||||||
|
|
||||||
if (pending_bytes > 0)
|
if (pending_bytes > 0)
|
||||||
return;
|
return;
|
||||||
@ -145,7 +153,8 @@ void zmq::pgm_receiver_t::in_event ()
|
|||||||
unsigned char *data = NULL;
|
unsigned char *data = NULL;
|
||||||
const pgm_tsi_t *tsi = NULL;
|
const pgm_tsi_t *tsi = NULL;
|
||||||
|
|
||||||
zmq_assert (pending_bytes == 0);
|
if (pending_bytes > 0)
|
||||||
|
return;
|
||||||
|
|
||||||
if (has_rx_timer) {
|
if (has_rx_timer) {
|
||||||
cancel_timer (rx_timer_id);
|
cancel_timer (rx_timer_id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user