From d1dca68ffb343e646d7f9e8482630337bd282dfe Mon Sep 17 00:00:00 2001 From: liuwei Date: Thu, 15 May 2025 14:57:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E7=94=A8=E6=88=B7=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E9=80=80=E5=87=BA=EF=BC=8C=E5=88=99=E4=B8=8D=E5=8F=91?= =?UTF-8?q?=E9=80=81=E7=9B=B8=E5=85=B3=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- robot.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/robot.py b/robot.py index 245ee7d..5c9cf07 100644 --- a/robot.py +++ b/robot.py @@ -218,6 +218,9 @@ class Robot(Job): data = await self.ipad_bot.sync_message() except Exception as e: self.LOG.warning(f"获取新消息失败 {e}") + if e == "用户可能退出": + self.LOG.error(f"获取新消息失败 {e},请重启应用重新登录!") + self.ipad_running = False await asyncio.sleep(5) continue @@ -312,10 +315,8 @@ class Robot(Job): else: self.LOG.warning("心跳失败") self.LOG.error(f"wechat_ipad heartbeat heartbeat twice_auto_auth ") - self.login_twice_auto_auth() except Exception as e: self.LOG.error(f"wechat_ipad heartbeat: {e}") - self.login_twice_auto_auth() await asyncio.sleep(5) async def _heartbeat_task_long(self): @@ -329,10 +330,8 @@ class Robot(Job): else: self.LOG.warning("长连接心跳失败") self.LOG.error(f"wechat_ipad heartbeat long twice_auto_auth ") - self.login_twice_auto_auth() except Exception as e: self.LOG.error(f"wechat_ipad heartbeat long: {e}") - self.login_twice_auto_auth() await asyncio.sleep(30) async def _process_ipad_message(self, message: WxMessage):