bugfix: uncaught exception when ws fails or times out handshake

This commit is contained in:
Dave Horton
2022-02-23 14:02:26 -05:00
parent 6f7556981e
commit 6033676f6b

View File

@@ -109,8 +109,10 @@ class WsRequestor extends BaseRequestor {
close() { close() {
this.logger.info('WsRequestor: closing socket'); this.logger.info('WsRequestor: closing socket');
this.ws && this.ws.close(); if (this.ws) {
this.ws.removeAllListeners(); this.ws.close();
this.ws.removeAllListeners();
}
} }
_connect() { _connect() {