bug fixes

This commit is contained in:
Adhiraj
2020-08-28 13:59:35 +05:30
parent bf3ff1a731
commit d0c593731e
3 changed files with 6 additions and 5 deletions

View File

@@ -214,7 +214,7 @@ export class WAConnection extends EventEmitter {
const response = await this.waitForMessage(tag, json, timeoutMs)
if (expect200 && response.status && Math.floor(+response.status / 100) !== 2) {
if (response.status >= 500) {
if (response.status === 599) {
this.unexpectedDisconnect (DisconnectReason.badSession)
const response = await this.query ({json, binaryTags, tag, timeoutMs, expect200, waitForOpen})
return response