Update 1.Validation.ts

This commit is contained in:
Adhiraj Singh
2020-12-06 19:46:20 +05:30
parent a464923402
commit 69ec8b97b1

View File

@@ -49,7 +49,7 @@ export class WAConnection extends Base {
else json.push ('takeover')
// send login every 10s
const sendLoginReq = () => {
if (this.conn?.readyState !== this.conn.OPEN) {
if (!this.conn || this.conn?.readyState !== this.conn.OPEN) {
this.logger.warn('Received login timeout req when WS not open, ignoring...')
return
}