()
| 274 | } |
| 275 | |
| 276 | const scheduleReconnect = () => { |
| 277 | if (closed) return |
| 278 | if (reconnect) clearTimeout(reconnect) |
| 279 | attempt += 1 |
| 280 | const delay = Math.min(1000 * 2 ** (attempt - 1), 10_000) |
| 281 | reconnect = setTimeout(connect, delay) |
| 282 | } |
| 283 | |
| 284 | const scheduleZedPoll = () => { |
| 285 | if (closed) return |