@resolveio/client-lib-core 1.4.1 → 1.4.3
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/esm2020/lib/socket-manager.service.mjs +4 -6
- package/esm2020/lib/socket.service.mjs +3 -3
- package/fesm2015/resolveio-client-lib-core.mjs +5 -7
- package/fesm2015/resolveio-client-lib-core.mjs.map +1 -1
- package/fesm2020/resolveio-client-lib-core.mjs +5 -7
- package/fesm2020/resolveio-client-lib-core.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -295,7 +295,7 @@ class SocketService {
|
|
|
295
295
|
startPinging() {
|
|
296
296
|
this.pingInterval = setInterval(() => {
|
|
297
297
|
if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
|
298
|
-
this.ws.send(['ping']
|
|
298
|
+
this.ws.send(JSON.stringify(['ping'])); // You can adjust this based on the server's expectations
|
|
299
299
|
this.pongTimeout = setTimeout(() => {
|
|
300
300
|
this.log(new Date(), 'WS', 'pong not received, closing connection');
|
|
301
301
|
this.close();
|
|
@@ -317,7 +317,7 @@ class SocketService {
|
|
|
317
317
|
return true;
|
|
318
318
|
}
|
|
319
319
|
else {
|
|
320
|
-
this.log(new Date(), 'WS', 'send error', this.
|
|
320
|
+
this.log(new Date(), 'WS', 'send error', this.readyState);
|
|
321
321
|
this.reconnect();
|
|
322
322
|
return false;
|
|
323
323
|
}
|
|
@@ -1206,11 +1206,9 @@ class SocketManagerService {
|
|
|
1206
1206
|
if (collectionUpdates.length) {
|
|
1207
1207
|
this.send('Offline Updates', new Date(), this.messageId++, 'offline', collectionUpdates.sort((a, b) => a.date.getTime() - b.date.getTime()));
|
|
1208
1208
|
}
|
|
1209
|
-
|
|
1210
|
-
this.
|
|
1211
|
-
|
|
1212
|
-
});
|
|
1213
|
-
}
|
|
1209
|
+
this._subArray.forEach(sub => {
|
|
1210
|
+
this.send(sub.messageRoute, new Date(), sub.messageId, 'subscription', 'sub', sub.subscription, ...sub.parameters);
|
|
1211
|
+
});
|
|
1214
1212
|
this.initConnection = true;
|
|
1215
1213
|
}, 1000);
|
|
1216
1214
|
};
|