From 4a014d6d99f07ce6378431717e6fb5840184e2b3 Mon Sep 17 00:00:00 2001 From: K <61059522+kahme247@users.noreply.github.com> Date: Mon, 23 Nov 2026 10:35:24 +0200 Subject: [PATCH 1/2] fix(hosts): keep the upload-retention retry timer ref'd so it fires on Windows (fixes #536) --- lib/hosts/upload-retention-sync.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/hosts/upload-retention-sync.ts b/lib/hosts/upload-retention-sync.ts index 4d04c61ae..c2a073714 100644 --- a/lib/hosts/upload-retention-sync.ts +++ b/lib/hosts/upload-retention-sync.ts @@ -12,14 +12,19 @@ function send(hostId: string, days: number | null, delay = 1_000): void { // 501: a daemon from before the op keeps what it has. 503: offline, the next hello tells it. if (error instanceof HostOpError && (error.status === 501 || error.status === 503)) return; console.warn(`[omp-web] could not set the upload retention on host ${hostId}: ${error instanceof Error ? error.message : String(error)}`); - const timer = setTimeout(() => { + // Deliberately ref'd: the retry must fire even when nothing else keeps + // the event loop alive. An unref'd timer was observed to be lost on + // Windows CI (issue #536: "the current policy to retry" never arrived), + // leaving the daemon on a superseded policy until the next hello or + // change. The callback re-checks the link and the current setting, so a + // late fire is harmless, and it never re-arms after disconnect. + setTimeout(() => { const host = getHost(hostId); // A pending retry must never restore an older, potentially more destructive setting. if (host && isLinkUp(host.status()) && loadWebServerSettings().uploadRetentionDays === days) { send(hostId, days, Math.min(delay * 2, 30_000)); } }, delay); - timer.unref(); }); } From 05eeca02764defb2bdb99237e53b72645ab9fe8a Mon Sep 17 00:00:00 2001 From: K <61059522+kahme247@users.noreply.github.com> Date: Mon, 23 Nov 2026 11:24:14 +0200 Subject: [PATCH 2/2] ci: re-run Verify after flaky macOS failure