Merge remote-tracking branch 'origin/2.3' into 2.4

This commit is contained in:
Markus Mäkelä
2020-03-30 10:23:35 +03:00
3 changed files with 11 additions and 2 deletions

View File

@ -1352,7 +1352,11 @@ bool runtime_destroy_monitor(Monitor* monitor)
{
bool rval = false;
if (Service* s = service_uses_monitor(monitor))
if (!monitor->servers().empty())
{
config_runtime_error("Cannot destroy monitor '%s', it is monitoring servers.", monitor->name());
}
else if (Service* s = service_uses_monitor(monitor))
{
config_runtime_error("Monitor '%s' cannot be destroyed as it is used by service '%s'",
monitor->name(), s->name());