update package

This commit is contained in:
Adhiraj
2020-08-30 01:20:03 +05:30
parent 904bade7a8
commit 8aa3dff6e5
3 changed files with 290 additions and 285 deletions

View File

@@ -293,6 +293,7 @@ export class WAConnection extends EventEmitter {
this.qrTimeout && clearTimeout (this.qrTimeout)
this.phoneCheck && clearTimeout (this.phoneCheck)
this.keepAliveReq && clearInterval(this.keepAliveReq)
this.state = 'close'
this.msgCount = 0
@@ -314,7 +315,7 @@ export class WAConnection extends EventEmitter {
delete this.callbacks[key]
}
})
if (this.keepAliveReq) clearInterval(this.keepAliveReq)
// reconnecting if the timeout is active for the reconnect loop
this.emit ('close', { reason, isReconnecting: this.cancelReconnect || isReconnecting})
}