bugfix: uncaught exception when ws fails or times out handshake

This commit is contained in:
Dave Horton committed 2022-02-23 14:02:26 -05:00
1 parent 6f7556981e
commit 6033676f6b
1 file changed
+4 -2
+4 -2
View File
@@ -109,8 +109,10 @@ class WsRequestor extends BaseRequestor {
close() {
this.logger.info('WsRequestor: closing socket');
this.ws && this.ws.close();
this.ws.removeAllListeners();
if (this.ws) {
this.ws.close();
this.ws.removeAllListeners();
}
}
_connect() {