Improve the chances of logging out not breaking everything

This commit is contained in:
Tulir Asokan
2018-01-14 21:00:50 +02:00
parent 29ddde0593
commit ce32e8326c
+2 -1
View File
@@ -196,6 +196,7 @@ class TelegramPuppet {
}
logOut() {
clearInterval(this.loop)
return this.client("auth.logOut")
}
@@ -509,7 +510,7 @@ class TelegramPuppet {
} catch (err) {
console.error("Failed to update dialogs:", err)
}
setInterval(async () => {
this.loop = setInterval(async () => {
try {
await this.client("updates.getState", {})
} catch (err) {