Fix native health polling and isolate file operation traffic
This commit is contained in:
@@ -150,10 +150,14 @@ async function refreshServerStatus(server: string): Promise<number | null> {
|
||||
if (unchanged()) {
|
||||
updates.container_state = container.ok ? 'running' : container.state?.toLowerCase() ?? 'unknown';
|
||||
updates.container_checked_at = new Date().toISOString();
|
||||
if (!container.ok) {
|
||||
// An unavailable inspection is not evidence that the game stopped.
|
||||
// Probe it just as a manual RCON check would; explicit lifecycle or
|
||||
// unhealthy states still take precedence over game replies.
|
||||
const unavailable = updates.container_state === 'unknown';
|
||||
if (!container.ok && !unavailable) {
|
||||
updates.last_error = null;
|
||||
updates.last_reply_snippet = null;
|
||||
} else if (!telemetryEvidence(srv.name)) {
|
||||
} else if (unavailable || !telemetryEvidence(srv.name)) {
|
||||
flush();
|
||||
const result = await rconStatusResult(srv.name).catch(err => ({ ok: false as const,
|
||||
reason: 'send-error' as RconFailure, detail: (err as Error).message, rawReply: undefined }));
|
||||
|
||||
Reference in New Issue
Block a user