Fix ping not happening more than once

This commit is contained in:
Adhiraj Singh
2021-03-11 13:52:52 +05:30
parent e670ff003e
commit 4c2f954601
4 changed files with 32 additions and 35 deletions

View File

@@ -94,7 +94,9 @@ export class WAConnection extends EventEmitter {
1000,
() => this.state === 'connecting' && this.endConnection(DisconnectReason.timedOut)
)
// timeout to know when we're done recieving messages
protected messagesDebounceTimeout = Utils.debouncedTimeout(2000)
// ping chats till recieved
protected chatsDebounceTimeout = Utils.debouncedTimeout(10_000)
/**
* Connect to WhatsAppWeb