@resolveio/client-lib-core 15.1.1 → 15.1.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.
@@ -273,7 +273,7 @@ class SocketService {
273
273
  this.log(new Date(), 'WS', 'onclose', this.url);
274
274
  this.onclose(event);
275
275
  setTimeout(() => {
276
- this.connect();
276
+ this.reconnect();
277
277
  }, this.reconnectInterval);
278
278
  this.stopPinging();
279
279
  };
@@ -291,7 +291,7 @@ class SocketService {
291
291
  this.ws.onerror = (event) => {
292
292
  this.log(new Date(), 'WS', 'onerror', this, event);
293
293
  this.onerror(event);
294
- this.reconnect();
294
+ this.close();
295
295
  };
296
296
  }
297
297
  }
@@ -352,7 +352,7 @@ class SocketService {
352
352
  }
353
353
  }
354
354
  send(...data) {
355
- if (this.ws && this.ws.readyState === this.ws.OPEN) {
355
+ if (this.isWebSocketActive()) {
356
356
  data.forEach(item => this.convertDatesToUTC(item));
357
357
  this.ws.send(JSON.stringify(data));
358
358
  return true;