]> 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>
Thu, 17 Dec 2015 11:09:42 +0000 (12:09 +0100)
refs #10860

lib/db_ido/dbconnection.cpp

index 15bf6a398243afc18f9fc2ff2b9684fc1e5b8c9c..e81db35321d3c20fb0c0b8afd45422510074294d 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();