increment before calculate

This commit is contained in:
Alex Holliday committed 2026-02-17 23:40:14 +00:00
1 parent 374b6aa6ae
commit c920191984
1 file changed
+1 -1
@@ -79,6 +79,7 @@ export class StatusService implements IStatusService {
}
// Update stats
stats.totalChecks++;
// Last response time
stats.lastResponseTime = responseTime ?? 0;
@@ -100,7 +101,6 @@ export class StatusService implements IStatusService {
stats.avgResponseTime = avgResponseTime;
// Total checks
stats.totalChecks++;
if (status === true) {
stats.totalUpChecks++;
// Update the timeSinceLastFailure if needed