mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-24 06:05:01 +02:00
IcingaDB::PrepareObject(): cut off (0) negative Command#timeout for Redis
not to crash the Go daemon which expects positive values there.
This commit is contained in:
parent
9f08bad395
commit
d641a3c799
@ -1508,7 +1508,7 @@ bool IcingaDB::PrepareObject(const ConfigObject::Ptr& object, Dictionary::Ptr& a
|
|||||||
Command::Ptr command = static_pointer_cast<Command>(object);
|
Command::Ptr command = static_pointer_cast<Command>(object);
|
||||||
|
|
||||||
attributes->Set("command", JsonEncode(command->GetCommandLine()));
|
attributes->Set("command", JsonEncode(command->GetCommandLine()));
|
||||||
attributes->Set("timeout", command->GetTimeout());
|
attributes->Set("timeout", std::max(0, command->GetTimeout()));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user