File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1655,7 +1655,10 @@ let needSetup = false;
16551655 await UptimeCalculator . clearStatistics ( monitorID ) ;
16561656
16571657 if ( monitorID in server . monitorList ) {
1658- await restartMonitor ( socket . userID , monitorID ) ;
1658+ const monitor = server . monitorList [ monitorID ] ;
1659+ if ( monitor . active ) {
1660+ await restartMonitor ( socket . userID , monitorID ) ;
1661+ }
16591662 }
16601663
16611664 await sendHeartbeatList ( socket , monitorID , true , true ) ;
@@ -1681,7 +1684,10 @@ let needSetup = false;
16811684
16821685 // Restart all monitors to reset the stats
16831686 for ( let monitorID in server . monitorList ) {
1684- await restartMonitor ( socket . userID , monitorID ) ;
1687+ const monitor = server . monitorList [ monitorID ] ;
1688+ if ( monitor . active ) {
1689+ await restartMonitor ( socket . userID , monitorID ) ;
1690+ }
16851691 }
16861692
16871693 callback ( {
You can’t perform that action at this time.
0 commit comments