mirror of https://github.com/Icinga/icinga2.git
Fixed infinite loop bug in Service::BeginExecuteCheck.
This commit is contained in:
parent
7526ee3a9e
commit
39008eff4e
|
@ -661,7 +661,9 @@ void Service::BeginExecuteCheck(const function<void (void)>& callback)
|
|||
arguments.push_back(static_cast<Service::Ptr>(GetSelf()));
|
||||
ScriptTask::Ptr task;
|
||||
task = InvokeMethod("check", arguments, boost::bind(&Service::CheckCompletedHandler, this, scheduleInfo, _1, callback));
|
||||
Set("current_task", task);
|
||||
|
||||
if (!task->IsFinished())
|
||||
Set("current_task", task);
|
||||
} catch (...) {
|
||||
/* something went wrong while setting up the method call -
|
||||
* reschedule the service and call the callback anyway. */
|
||||
|
|
Loading…
Reference in New Issue