From 4fa0b1535003aec5983cf701086e52fbfb903f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=8C=8C?= Date: Tue, 28 May 2024 12:21:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/config/init.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/config/init.js b/lib/config/init.js index cdc8ffc7..eead47d5 100644 --- a/lib/config/init.js +++ b/lib/config/init.js @@ -11,9 +11,9 @@ let stack const exit = process.exit process.exit = async code => { stack = new Error().stack.replace(/.*\n/, "\n") - if (typeof redis === "object") { + if (typeof redis === "object" && redis.process) { await Bot.sleep(5000, redis.save()) - redis.process?.kill() + redis.process.kill() } exit(code) } diff --git a/package.json b/package.json index 0bdeac31..dae9c072 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-n": "^16.6.2", - "eslint-plugin-promise": "^6.1.1" + "eslint-plugin-promise": "^6.2.0" }, "imports": { "#miao": "./plugins/miao-plugin/components/index.js",