]> granicus.if.org Git - icinga2/commitdiff
Shutdown timers cleanly on exit 7331/head
authorAlexander A. Klimov <alexander.klimov@icinga.com>
Wed, 17 Jul 2019 11:35:59 +0000 (13:35 +0200)
committerAlexander A. Klimov <alexander.klimov@icinga.com>
Wed, 17 Jul 2019 11:53:43 +0000 (13:53 +0200)
refs #7327

lib/base/timer.cpp

index 07a4f30de413acb662773768afca60d3d53c169f..6abac8566e7a4506a0d60ddb4a5e3d63764c02b5 100644 (file)
@@ -1,5 +1,6 @@
 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
 
+#include "base/defer.hpp"
 #include "base/timer.hpp"
 #include "base/debug.hpp"
 #include "base/logger.hpp"
@@ -57,6 +58,8 @@ static bool l_StopTimerThread;
 static TimerSet l_Timers;
 static int l_AliveTimers = 0;
 
+static Defer l_ShutdownTimersCleanlyOnExit (&Timer::Uninitialize);
+
 /**
  * Destructor for the Timer class.
  */