@knowlearning/agents 0.9.147 → 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...
@@ -142,7 +142,7 @@ export default function messageQueue({ token, sid, domain, Connection, watchers,
142
142
  resolveEnvironment(message)
143
143
  }
144
144
  else if (server !== message.server) {
145
- console.warn(`REBOOTING DUE TO SERVER SWITCH ${server} -> ${message.server}`)
145
+ console.warn(`REBOOTING DUE TO SERVER SWITCH ${server} -> ${message.server}`, message)
146
146
  reboot()
147
147
  }
148
148
  else {
@@ -205,7 +205,7 @@ export default function messageQueue({ token, sid, domain, Connection, watchers,
205
205
  }
206
206
  }
207
207
  catch (error) {
208
- console.error('ERROR HANDLING CONNECTION MESSAGE', error)
208
+ console.error('ERROR HANDLING CONNECTION MESSAGE', error, message)
209
209
  }
210
210
  }
211
211
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowlearning/agents",
3
- "version": "0.9.147",
3
+ "version": "0.9.149",
4
4
  "description": "API for embedding applications in KnowLearning systems.",
5
5
  "main": "node.js",
6
6
  "browser": "browser.js",