From ff63dd7db7f7ba2f9080cd97ebc7cd408a4e047e Mon Sep 17 00:00:00 2001 From: ikuradon Date: Wed, 20 Nov 2024 15:30:22 +0900 Subject: [PATCH] Add restart script on disconnect --- src/app.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app.ts b/src/app.ts index 950dbeb..bfc2575 100644 --- a/src/app.ts +++ b/src/app.ts @@ -2137,6 +2137,11 @@ const main = async (): Promise => { process.exit(0); }); + relay.on("disconnect", () => { + console.error("切断されました…"); + process.exit(0); + }); + await relay.connect(); console.log("リレーに接続しました");