From be6e344c8f28164cc002b9e6c8168d8b3ec56771 Mon Sep 17 00:00:00 2001 From: CryptoCompiler <72892531+peepopoggers@users.noreply.github.com> Date: Fri, 22 Jan 2021 00:16:23 +0000 Subject: [PATCH] misc --- src/websocket-client.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/websocket-client.ts b/src/websocket-client.ts index b1ed90f..0fc35a6 100644 --- a/src/websocket-client.ts +++ b/src/websocket-client.ts @@ -45,7 +45,6 @@ export class WebsocketClient extends EventEmitter { super(); this.logger = logger || DefaultLogger; - this.readyState = READY_STATE_INITIAL; this.pingInterval = undefined; this.pongTimeout = undefined; @@ -60,7 +59,6 @@ export class WebsocketClient extends EventEmitter { this.client = new InverseClient(undefined, undefined, this.options.livenet, this.options.restOptions, this.options.requestOptions); this._subscriptions = new Set(); - this._connect(); } @@ -101,7 +99,6 @@ export class WebsocketClient extends EventEmitter { const authParams = await this._authenticate(); const url = this._getWsUrl() + authParams; - const ws = new WebSocket(url); ws.onopen = this._wsOpenHandler.bind(this); @@ -110,7 +107,7 @@ export class WebsocketClient extends EventEmitter { ws.onclose = this._wsCloseHandler.bind(this); this.ws = ws; - + } catch (err) { this.logger.error('Connection failed: ', err); this._reconnect(this.options.reconnectTimeout);