#660·pull

意外断开MongoDB() + redisClient.quit() 在 SIGINT/SIGTERM 处理程序中发生竞争 Deno.exit(0)

作者: chirag127创建于 2026年7月4日更新于 2026年7月4日

问题

src/index.ts 中的 handleAppTermination 是一个同步函数,在 Mongo 断开连接和 Redis 退出完成之前调用 Deno.exit(0),因此关闭日志会产生误导,连接可能不会清理干净。