From 8e4cc0de256971414e0f39772144d9583f48fd43 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 19 Mar 2013 16:12:28 +0100 Subject: [PATCH] Reschedule timers even if the OnTimerExpired handler threw an exception. --- lib/base/timer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/base/timer.cpp b/lib/base/timer.cpp index 4d0938fc0..a87a0d1ed 100644 --- a/lib/base/timer.cpp +++ b/lib/base/timer.cpp @@ -117,7 +117,13 @@ void Timer::Call(void) Timer::Ptr self = GetSelf(); - OnTimerExpired(self); + try { + OnTimerExpired(self); + } catch (...) { + Reschedule(); + + throw; + } Reschedule(); } -- 2.40.0