Prune expired entries from webPortProbeCache during cache reads

This commit is contained in:
Cursor Agent committed 2026-04-04 23:28:35 +00:00
1 parent bc30ac51f5
commit 2d3f25de8a
1 file changed
+6
@@ -613,6 +613,12 @@ export const makeTerminalManagerWithOptions = Effect.fn("makeTerminalManagerWith
return cached.isWeb;
}
for (const [p, entry] of webPortProbeCache) {
if (now - entry.checkedAt > webPortProbeCacheTtlMs) {
webPortProbeCache.delete(p);
}
}
const isWeb = yield* webPortInspector(port).pipe(Effect.catch(() => Effect.succeed(false)));
webPortProbeCache.set(port, {
isWeb,