@unboundcx/sdk 4.1.0 → 4.1.1
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.
- package/package.json +1 -1
- package/services/liveQuery.js +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unboundcx/sdk",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "Official JavaScript SDK for the Unbound API - A comprehensive toolkit for integrating with Unbound's communication, AI, and data management services",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
package/services/liveQuery.js
CHANGED
|
@@ -154,6 +154,14 @@ class LiveQueryHandle {
|
|
|
154
154
|
this.subscriptionId = ack.subscriptionId;
|
|
155
155
|
this.mode = ack.mode;
|
|
156
156
|
this.seq = 0;
|
|
157
|
+
// Re-resolve the manager at registration time: if a concurrent
|
|
158
|
+
// unsubscribe drained the manager while this subscribe was in flight,
|
|
159
|
+
// destroy() stripped its socket listeners and dropped it from
|
|
160
|
+
// socketManagers - registering onto that dead instance would leave this
|
|
161
|
+
// handle deaf (server sub alive, frames arriving at the socket, nothing
|
|
162
|
+
// listening). getSocketManager() returns a fresh, listening manager in
|
|
163
|
+
// that case.
|
|
164
|
+
this.manager = getSocketManager(this.socket);
|
|
157
165
|
this.manager.register(this);
|
|
158
166
|
this._setState('active');
|
|
159
167
|
return ack;
|