summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSteven McCoy <steven.mccoy@miru.hk>2010-10-11 17:59:58 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-10-11 17:59:58 +0200
commit5b8af52efc0ddf1df5506a2800aa69bc50a44ddb (patch)
treebca243aa3f36973c46adf58824d5aed08c1ab34f /src
parente168173162dd26238a799c19142bab8b7885ebb3 (diff)
Fix assertion in PGM transports on cancel_timer
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
Diffstat (limited to 'src')
-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