From daa02ac55ac900bc141fc331d377f05efeef8868 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Mon, 2 May 2022 11:12:39 -0400 Subject: [PATCH] logging --- lib/utils/ws-requestor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils/ws-requestor.js b/lib/utils/ws-requestor.js index f8f0cdee..b3f40ae9 100644 --- a/lib/utils/ws-requestor.js +++ b/lib/utils/ws-requestor.js @@ -128,9 +128,9 @@ class WsRequestor extends BaseRequestor { close() { this.closedByUs = true; + this.logger.info('WsRequestor:close closing socket'); try { if (this.ws) { - this.logger.info('WsRequestor:close closing socket'); this.ws.close(); this.ws.removeAllListeners(); } @@ -194,10 +194,10 @@ class WsRequestor extends BaseRequestor { } _onOpen(ws) { + this.logger.info({url: this.url}, 'WsRequestor - successfully connected'); if (this.ws) this.logger.info({old_ws: this.ws._socket.address()}, 'WsRequestor:_onOpen'); assert(!this.ws); this.emit('ready', ws); - this.logger.info({url: this.url}, 'WsRequestor - successfully connected'); } _onClose() {