From e0ee0d3c8957555522417871dcbc7af23969d0a8 Mon Sep 17 00:00:00 2001 From: tiagosiebler Date: Sun, 7 Feb 2021 17:01:05 +0000 Subject: [PATCH] cleaning --- src/websocket-client.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/websocket-client.ts b/src/websocket-client.ts index 983e045..b81520b 100644 --- a/src/websocket-client.ts +++ b/src/websocket-client.ts @@ -129,7 +129,6 @@ export class WebsocketClient extends EventEmitter { this.wsStore.getKeys().forEach(wsKey => { // if connected, send subscription request if (this.wsStore.isConnectionState(wsKey, READY_STATE_CONNECTED)) { - console.log(`${wsKey} is supposedly connected - sending request for topics`); return this.requestSubscribeTopics(wsKey, [...this.wsStore.getTopics(wsKey)]); } @@ -332,7 +331,7 @@ export class WebsocketClient extends EventEmitter { try { this.logger.silly(`Sending upstream ws message: `, { ...loggerCategory, wsMessage, wsKey }); if (!wsKey) { - console.error('ws with key: ', wsKey, ' not found'); + throw new Error('Cannot send message due to no known websocket for this wsKey'); } this.getWs(wsKey)?.send(wsMessage); } catch (e) {