()
| 216 | } |
| 217 | |
| 218 | function scheduleReconnect() { |
| 219 | if (!shouldMaintainWs || !hasConfiguredWebAuth() || reconnectTimer !== null) { |
| 220 | return; |
| 221 | } |
| 222 | |
| 223 | reconnectTimer = window.setTimeout(() => { |
| 224 | reconnectTimer = null; |
| 225 | void ensureBackgroundWsConnection(); |
| 226 | }, 1000); |
| 227 | } |
| 228 | |
| 229 | async function ensureBackgroundWsConnection() { |
| 230 | try { |
no test coverage detected