fix: pairing admin satisfies write (#23125) (thanks @vignesh07)

This commit is contained in:
Vignesh Natarajan
2026-02-21 18:24:58 -08:00
committed by Vignesh
parent 426d97797d
commit 5b4409d5d0
4 changed files with 58 additions and 3 deletions

View File

@@ -231,7 +231,11 @@ export async function acquireGatewayLock(
const st = await fs.stat(lockPath);
stale = Date.now() - st.mtimeMs > staleMs;
} catch {
stale = true;
// On Windows or locked filesystems we may be unable to stat the
// lock file even though the existing gateway is still healthy.
// Treat the lock as non-stale so we keep waiting instead of
// forcefully removing another gateway's lock.
stale = false;
}
}
if (stale) {