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",