From 8436451c1ddad90da77cd1597eb5c85ce639adb7 Mon Sep 17 00:00:00 2001 From: Sorunome Date: Sun, 5 Apr 2020 12:08:37 +0200 Subject: [PATCH] hopefully better error/disconnect detection --- src/client.ts | 1 + src/skype.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/client.ts b/src/client.ts index 9c47fdd..f880bad 100644 --- a/src/client.ts +++ b/src/client.ts @@ -335,6 +335,7 @@ export class Client extends EventEmitter { } } catch (err) { log.error("Failed to get contacts diff", err); + this.emit("error", err); } } } diff --git a/src/skype.ts b/src/skype.ts index ebcb585..4daab90 100644 --- a/src/skype.ts +++ b/src/skype.ts @@ -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;