fix: stop SSH-authenticating hosts during routine status polling (#1347)

This commit is contained in:
Wali Lambert
2026-08-27 06:40:24 +08:00
committed by GitHub
parent 19d4d91eee
commit ef4e66659c
4 changed files with 47 additions and 47 deletions
-15
View File
@@ -15,18 +15,3 @@ export function statusAfterAuthentication(
if (authenticated) return "online";
return current === "offline" ? "offline" : "reachable";
}
/**
* Whether the cheap status probe must also authenticate over SSH.
*
* "online" means authenticated, and normally the metrics poll proves that.
* That poll only runs while someone is viewing the host, so an unwatched host
* with metrics enabled would otherwise never leave "reachable" - while a host
* with metrics disabled, whose probe always authenticates, shows online.
*/
export function needsStatusPollAuthentication(
metricsEnabled: boolean,
hasViewers: boolean,
): boolean {
return !metricsEnabled || !hasViewers;
}