]> granicus.if.org Git - icinga2/commitdiff
Rotate replay log on shutdown, not on startup
authorAlexander A. Klimov <alexander.klimov@icinga.com>
Wed, 17 Apr 2019 12:18:20 +0000 (14:18 +0200)
committerAlexander A. Klimov <alexander.klimov@icinga.com>
Wed, 17 Apr 2019 12:18:20 +0000 (14:18 +0200)
lib/remote/apilistener.cpp

index 4d788610f1f63f34858834c598c9f3b5c8283786..8aea0915954d0a63725faf230400eed7a26db95e 100644 (file)
@@ -229,7 +229,6 @@ void ApiListener::Start(bool runtimeCreated)
 
        {
                boost::mutex::scoped_lock lock(m_LogLock);
-               RotateLogFile();
                OpenLogFile();
        }
 
@@ -280,6 +279,7 @@ void ApiListener::Stop(bool runtimeDeleted)
        {
                boost::mutex::scoped_lock lock(m_LogLock);
                CloseLogFile();
+               RotateLogFile();
        }
 
        RemoveStatusFile();