@knowlearning/agents 0.9.148 → 0.9.149
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -98,9 +98,9 @@ export default function messageQueue({ token, sid, domain, Connection, watchers,
|
|
|
98
98
|
if (restarting) return
|
|
99
99
|
|
|
100
100
|
authed = false
|
|
101
|
+
connection.onmessage = () => {} // needs to be a no-op since a closing connection can still get messages
|
|
101
102
|
if (!disconnected) {
|
|
102
103
|
await new Promise(r => setTimeout(r, Math.min(1000, failedConnections * 100)))
|
|
103
|
-
connection.onmessage = () => {} // needs to be a no-op since a closing connection can still get messages
|
|
104
104
|
restarting = true
|
|
105
105
|
failedConnections += 1
|
|
106
106
|
initConnection() // TODO: don't do this if we are purposefully unloading...
|