comparison ServerMonitor/Objects/ServerMonitor.cs @ 25:781d8b980be1

Fix checks not getting scheduled when a server is enabled.
author Brad Greco <brad@bgreco.net>
date Thu, 30 May 2019 21:41:14 -0400
parents 68d7834dc28e
children 437442cd8090
comparison
equal deleted inserted replaced
24:06ff59b59e70 25:781d8b980be1
376 // Make sure the monitor is running. If no servers were enabled before this 376 // Make sure the monitor is running. If no servers were enabled before this
377 // one was enabled, it is not running. 377 // one was enabled, it is not running.
378 if (server.Enabled) 378 if (server.Enabled)
379 { 379 {
380 Run(); 380 Run();
381 // Schedule all checks to run.
382 foreach (Check check in server.Checks)
383 {
384 Server_CheckModified(check, new EventArgs());
385 }
381 } 386 }
382 else 387 else
383 { 388 {
384 // Cancel all queued and executing checks belonging to a 389 // Cancel all queued and executing checks belonging to a
385 // server that was disabled. 390 // server that was disabled.