From: Gunnar Beutner Date: Tue, 19 Mar 2013 15:12:28 +0000 (+0100) Subject: Reschedule timers even if the OnTimerExpired handler threw an exception. X-Git-Tag: v0.0.2~206 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e4cc0de256971414e0f39772144d9583f48fd43;p=icinga2 Reschedule timers even if the OnTimerExpired handler threw an exception. --- 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(); }