mirror of
https://github.com/stablyai/orca.git
synced 2026-10-18 00:03:20 +00:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user