Replace exponential backoff and the 12-attempt cap with a fixed 5s retry loop that keeps dialing after unexpected disconnects. Throttle toasts so the UI is not spammed while the offline banner stays up.
This commit is contained in:
+2
-1
@@ -1526,9 +1526,10 @@ export function initOpsApp({ navigateToView, sendCommand }) {
|
||||
}
|
||||
})
|
||||
manager.on('reconnecting', ({ attempt, delayMs }) => {
|
||||
const secs = Math.max(1, Math.round((delayMs || 5000) / 1000))
|
||||
setOfflineBanner(
|
||||
true,
|
||||
`Connection lost — reconnecting (attempt ${attempt}) in ${Math.round(delayMs / 1000)}s…`
|
||||
`Connection lost — retrying every ${secs}s (attempt ${attempt})…`
|
||||
)
|
||||
})
|
||||
manager.on('reconnected', () => {
|
||||
|
||||
Reference in New Issue
Block a user