diff --git a/main/xiaozhi-server/core/handle/abortHandle.py b/main/xiaozhi-server/core/handle/abortHandle.py index b7bf1611..c4a2fa88 100644 --- a/main/xiaozhi-server/core/handle/abortHandle.py +++ b/main/xiaozhi-server/core/handle/abortHandle.py @@ -9,6 +9,7 @@ TAG = __name__ async def handleAbortMessage(conn: "ConnectionHandler"): conn.logger.bind(tag=TAG).info("Abort message received") # 设置成打断状态,会自动打断llm、tts任务 + conn.close_after_chat = False conn.client_abort = True conn.clear_queues() # 打断客户端说话状态 diff --git a/main/xiaozhi-server/plugins_func/functions/handle_exit_intent.py b/main/xiaozhi-server/plugins_func/functions/handle_exit_intent.py index bd24f372..79347659 100644 --- a/main/xiaozhi-server/plugins_func/functions/handle_exit_intent.py +++ b/main/xiaozhi-server/plugins_func/functions/handle_exit_intent.py @@ -35,7 +35,8 @@ def handle_exit_intent(conn: "ConnectionHandler", say_goodbye: str | None = None try: if say_goodbye is None: say_goodbye = "再见,祝您生活愉快!" - conn.close_after_chat = True + if not conn.close_after_chat: + conn.close_after_chat = True logger.bind(tag=TAG).info(f"退出意图已处理:{say_goodbye}") return ActionResponse( action=Action.RESPONSE, result="退出意图已处理", response=say_goodbye