From 07076fd2276e2903edf0f8a733665eb06023d1ee Mon Sep 17 00:00:00 2001 From: Adhiraj Date: Tue, 25 Aug 2020 22:16:45 +0530 Subject: [PATCH] Update 3.Connect.ts --- src/WAConnection/3.Connect.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WAConnection/3.Connect.ts b/src/WAConnection/3.Connect.ts index cc9a96e..cebe4b4 100644 --- a/src/WAConnection/3.Connect.ts +++ b/src/WAConnection/3.Connect.ts @@ -263,7 +263,7 @@ export class WAConnection extends Base { await delay try { - const reconnectID = this.lastDisconnectReason !== 'replaced' && this.user ? this.user.id.replace ('@s.whatsapp.net', '@c.us') : null + const reconnectID = this.lastDisconnectReason !== 'replaced' && this.lastDisconnectReason !== 'unknown' && this.user ? this.user.id.replace ('@s.whatsapp.net', '@c.us') : null await this.connect ({ timeoutMs: 30000, retryOnNetworkErrors: true, reconnectID }) this.cancelReconnect = null break