fix: 将 Graceful shutdown 的异常改为 KeyboardInterrupt (#3855)

This commit is contained in:
Dt8333
2025-11-30 20:31:17 +08:00
committed by GitHub
parent 7faeb5cea8
commit a130db5cf4
@@ -250,7 +250,7 @@ class DingtalkPlatformAdapter(Platform):
async def terminate(self):
def monkey_patch_close():
raise Exception("Graceful shutdown")
raise KeyboardInterrupt("Graceful shutdown")
self.client_.open_connection = monkey_patch_close
await self.client_.websocket.close(code=1000, reason="Graceful shutdown")