Check if this.socket is available

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev committed 2022-02-16 10:19:23 +03:00
1 parent d656a9e289
commit 8888550a88
1 file changed
+1 -1
+1 -1
View File
@@ -181,7 +181,7 @@ export class WebSocketApi<Events extends WebSocketEvents> extends (EventEmitter
if (error) {
const { reconnectDelay } = this.params;
if (reconnectDelay) {
if (reconnectDelay && this.socket) {
const url = this.socket.url;
this.writeLog("will reconnect in", `${reconnectDelay}s`);