ReviewOS

also looking at this

stacks/rpx

fix(supervisor): stop reporting a shutdown as a readiness timeout

#2273
Merged glennmichael123 wants to merge fix/2272-shutdown-readiness-timeout into main
2 files +47 -1
packages/rpx/src/site-supervisor.tsmodified+8-0
Changes to packages/rpx/src/site-supervisor.ts
@@ -323,6 +323,14 @@ export class SiteSupervisor {
323323 await delay(this.pollIntervalMs)
324324 }
325325
326 // The loop also exits when `stopAll()` flips `stopped`, which is a
327 // deliberate shutdown rather than a timeout. Falling through to `fail()`
328 // there logged "did not become ready within 120s" for every site that was
329 // still booting, on every shutdown — a failure that never happened, and a
330 // second teardown on top of the one `stop()` is already running.
331 if (this.stopped)
332 return
333
326334 if (state.status === 'starting')
327335 this.fail(state, `did not become ready within ${Math.round(this.startupTimeoutMs / 1000)}s`)
328336 }