@resolveio/client-lib-core 1.4.1 → 1.4.2

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.
@@ -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'].toString()); // You can adjust this based on the server's expectations
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.ws.readyState);
320
+ this.log(new Date(), 'WS', 'send error', this.readyState);
321
321
  this.reconnect();
322
322
  return false;
323
323
  }