mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
Fix handling of m_RequestRestart in RunEventLoop, improve reload timeout
Refs #5788
This commit is contained in:
parent
3ece2ba643
commit
9f56b6ee74
@ -240,19 +240,19 @@ mainloop:
|
|||||||
}
|
}
|
||||||
|
|
||||||
lastLoop = now;
|
lastLoop = now;
|
||||||
|
}
|
||||||
if (m_RequestRestart) {
|
|
||||||
m_RequestRestart = false; // we are now handling the request, once is enough
|
|
||||||
|
|
||||||
// are we already restarting? ignore request if we already are
|
if (m_RequestRestart) {
|
||||||
if (m_Restarting)
|
m_RequestRestart = false; // we are now handling the request, once is enough
|
||||||
goto mainloop;
|
|
||||||
|
|
||||||
m_Restarting = true;
|
|
||||||
StartReloadProcess();
|
|
||||||
|
|
||||||
|
// are we already restarting? ignore request if we already are
|
||||||
|
if (m_Restarting)
|
||||||
goto mainloop;
|
goto mainloop;
|
||||||
}
|
|
||||||
|
m_Restarting = true;
|
||||||
|
StartReloadProcess();
|
||||||
|
|
||||||
|
goto mainloop;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log(LogInformation, "base", "Shutting down Icinga...");
|
Log(LogInformation, "base", "Shutting down Icinga...");
|
||||||
@ -289,7 +289,7 @@ void Application::StartReloadProcess(void) const
|
|||||||
|
|
||||||
Process::Ptr process = make_shared<Process>(args);
|
Process::Ptr process = make_shared<Process>(args);
|
||||||
|
|
||||||
process->SetTimeout(15);
|
process->SetTimeout(300);
|
||||||
|
|
||||||
process->Run(boost::bind(&Application::ReloadProcessCallback, _1));
|
process->Run(boost::bind(&Application::ReloadProcessCallback, _1));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user