hopefully better error/disconnect detection

This commit is contained in:
Sorunome 2020-04-05 12:08:37 +02:00
parent 2863938e68
commit 8436451c1d
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C
2 changed files with 2 additions and 0 deletions

View File

@ -335,6 +335,7 @@ export class Client extends EventEmitter {
}
} catch (err) {
log.error("Failed to get contacts diff", err);
this.emit("error", err);
}
}
}

View File

@ -188,6 +188,7 @@ export class Skype {
const MINUTE = 60000;
client.on("error", async (err: Error) => {
if (p.restarting) {
await this.puppet.sendStatusMessage(puppetId, "Got an error, but am already restrting, ignoring....");
return;
}
p.restarting = true;