Commit 5b8af52e authored by Steven McCoy's avatar Steven McCoy Committed by Martin Sustrik

Fix assertion in PGM transports on cancel_timer

Signed-off-by: 's avatarSteven McCoy <steven.mccoy@miru.hk>
parent e1681731
...@@ -235,6 +235,8 @@ void zmq::pgm_receiver_t::timer_event (int token) ...@@ -235,6 +235,8 @@ void zmq::pgm_receiver_t::timer_event (int token)
{ {
zmq_assert (token == rx_timer_id); zmq_assert (token == rx_timer_id);
// Timer cancels on return by poller_base.
has_rx_timer = false;
in_event (); in_event ();
} }
......
...@@ -188,11 +188,15 @@ void zmq::pgm_sender_t::out_event () ...@@ -188,11 +188,15 @@ void zmq::pgm_sender_t::out_event ()
void zmq::pgm_sender_t::timer_event (int token) void zmq::pgm_sender_t::timer_event (int token)
{ {
if (token == rx_timer_id) // Timer cancels on return by poller_base.
if (token == rx_timer_id) {
has_rx_timer = false;
in_event (); in_event ();
} else if (token == tx_timer_id) {
zmq_assert (token == tx_timer_id); has_tx_timer = false;
out_event (); out_event ();
} else
zmq_assert (false);
} }
#endif #endif
......
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