summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven McCoy <steven.mccoy@miru.hk>2011-01-17 14:45:24 +0100
committerMartin Sustrik <sustrik@250bpm.com>2011-01-17 14:45:24 +0100
commit667b247e322e2f0e99b680170a1d004f124b0568 (patch)
treec4cc56597726e6ec6df0c1e88748d8f1ab4979b1
parenta249d152003d7a7ebf048c2a9a0307abc1adb704 (diff)
Cancel pending timers when decoder for PGM stalls
Otherwise the timer event can raise an input event causing assertion on unprocessed data. Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
-rw-r--r--src/pgm_receiver.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pgm_receiver.cpp b/src/pgm_receiver.cpp
index 9773847..88ac698 100644
--- a/src/pgm_receiver.cpp
+++ b/src/pgm_receiver.cpp
@@ -227,6 +227,12 @@ void zmq::pgm_receiver_t::in_event ()
reset_pollin (pipe_handle);
reset_pollin (socket_handle);
+ // Reset outstanding timer.
+ if (has_rx_timer) {
+ cancel_timer (rx_timer_id);
+ has_rx_timer = false;
+ }
+
break;
}
}