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,6 +661,8 @@ void Service::BeginExecuteCheck(const function<void (void)>& callback)
|
||||||
arguments.push_back(static_cast<Service::Ptr>(GetSelf()));
|
arguments.push_back(static_cast<Service::Ptr>(GetSelf()));
|
||||||
ScriptTask::Ptr task;
|
ScriptTask::Ptr task;
|
||||||
task = InvokeMethod("check", arguments, boost::bind(&Service::CheckCompletedHandler, this, scheduleInfo, _1, callback));
|
task = InvokeMethod("check", arguments, boost::bind(&Service::CheckCompletedHandler, this, scheduleInfo, _1, callback));
|
||||||
|
|
||||||
|
if (!task->IsFinished())
|
||||||
Set("current_task", task);
|
Set("current_task", task);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
/* something went wrong while setting up the method call -
|
/* something went wrong while setting up the method call -
|
||||||
|
|
Loading…
Reference in New Issue