@resolveio/client-lib-core 15.1.5 → 15.1.6
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.
|
@@ -286,13 +286,13 @@ class SocketService {
|
|
|
286
286
|
this.connect();
|
|
287
287
|
}
|
|
288
288
|
connect() {
|
|
289
|
-
if (!this.ws && this._storage.get('accessToken')) {
|
|
289
|
+
if (!this.ws && this.readyState !== WebSocket.CONNECTING && this._storage.get('accessToken')) {
|
|
290
|
+
this.readyState = WebSocket.CONNECTING;
|
|
291
|
+
this.readyState$.next(this.readyState);
|
|
290
292
|
if (this.timeout) {
|
|
291
293
|
clearTimeout(this.timeout);
|
|
292
294
|
}
|
|
293
295
|
this.ws = new WebSocket(this.url, this.protocols);
|
|
294
|
-
this.readyState = WebSocket.CONNECTING;
|
|
295
|
-
this.readyState$.next(this.readyState);
|
|
296
296
|
this.onconnecting();
|
|
297
297
|
this.log(new Date(), 'WS', 'attempt-connect', this.url);
|
|
298
298
|
this.timeout = setTimeout(() => {
|