]> granicus.if.org Git - icinga2/commitdiff
Don't log IDO statistics when we're not connected
authorGunnar Beutner <gunnar@beutner.name>
Thu, 17 Dec 2015 11:05:35 +0000 (12:05 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 23 Feb 2016 08:15:23 +0000 (09:15 +0100)
refs #10860

lib/db_ido/dbconnection.cpp

index 919ef39595a8ece5441a30a2a77ee63e5ad37a41..64875d8223908d72052b3e6d710bdd4aca24515a 100644 (file)
@@ -67,6 +67,9 @@ void DbConnection::Start(bool runtimeCreated)
 
 void DbConnection::StatsLoggerTimerHandler(void)
 {
+       if (!GetConnected())
+               return;
+
        int pending = GetPendingQueryCount();
 
        double now = Utility::GetTime();