Fix pendingRequestTimeout bug

This commit is contained in:
Adhiraj Singh
2020-11-14 16:01:02 +05:30
parent 7a80bc1b92
commit 11d1dda3f5

View File

@@ -326,6 +326,9 @@ export class WAConnection extends EventEmitter {
let onOpen: () => void
let onClose: ({ reason }) => void
if (this.pendingRequestTimeoutMs <= 0) {
throw new BaileysError(DisconnectReason.close, { status: 428 })
}
await (
Utils.promiseTimeout (
this.pendingRequestTimeoutMs,