reject () fix

This commit is contained in:
Adhiraj Singh
2020-06-25 10:29:17 +05:30
parent 86ce14764a
commit e19770ef3a

View File

@@ -285,7 +285,7 @@ module.exports = {
resolve ()
})
} else {
throw "You're not even connected, you can't log out"
reject("You're not even connected, you can't log out")
}
})
.then (() => this.close ())
@@ -300,7 +300,7 @@ module.exports = {
const keys = Object.keys (this.callbacks)
keys.forEach (key => {
if (!key.includes ("function:")) {
this.callbacks[key].reject ("connection closed")
this.callbacks[key].errCallback ("connection closed")
delete this.callbacks[key]
}
} )