summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pgm_receiver.cpp2
-rw-r--r--src/pgm_sender.cpp12
2 files changed, 10 insertions, 4 deletions
diff --git a/src/pgm_receiver.cpp b/src/pgm_receiver.cpp
index 01b95b2..b0e92f9 100644
--- a/src/pgm_receiver.cpp
+++ b/src/pgm_receiver.cpp
@@ -235,6 +235,8 @@ void zmq::pgm_receiver_t::timer_event (int token)
{
zmq_assert (token == rx_timer_id);
+ // Timer cancels on return by poller_base.
+ has_rx_timer = false;
in_event ();
}
diff --git a/src/pgm_sender.cpp b/src/pgm_sender.cpp
index 82a37ab..3fc0d90 100644
--- a/src/pgm_sender.cpp
+++ b/src/pgm_sender.cpp
@@ -188,11 +188,15 @@ void zmq::pgm_sender_t::out_event ()
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 ();
-
- zmq_assert (token == tx_timer_id);
- out_event ();
+ } else if (token == tx_timer_id) {
+ has_tx_timer = false;
+ out_event ();
+ } else
+ zmq_assert (false);
}
#endif