fix: address pr-bug-scan validated finding from #2316

Wrapped await refresh() in try/catch inside the polling run() so a rejected scan no longer skips the setTimeout reschedule, keeping the LocalWorkspacePortsPanel poll loop alive across transient RPC er
This commit is contained in:
orca-bug-scan-bot
2026-05-19 12:22:11 -07:00
parent 062725da76
commit 4fee9da9f5
@@ -275,7 +275,11 @@ function LocalWorkspacePortsPanel({ isVisible }: { isVisible: boolean }): React.
}
async function run(): Promise<void> {
await refresh()
try {
await refresh()
} catch {
// Why: a transient RPC failure must not halt the poll loop.
}
if (!cancelled) {
timeout = setTimeout(() => void run(), LOCAL_PORT_SCAN_INTERVAL_MS)
}