[patch] 处理PDD登录时get_auth_token方法报出的response返回异常未处理报错问题

This commit is contained in:
2025-10-18 16:12:57 +08:00
parent ceb5d83d75
commit fd6dbfc8da
2 changed files with 226 additions and 29 deletions

View File

@@ -721,8 +721,8 @@ class WebSocketManager:
# 根据实际登录结果上报状态给后端
if self.backend_client and result not in ["need_verification_code", "verification_code_error",
"login_failure"]:
# 如果是特殊状态,说明通知已经在PddLogin中发送,不需要重复发送
"login_failure", "cookie_expired"]:
# 🔥 如果是特殊状态包括cookie_expired,说明通知已经发送,不需要重复发送
try:
message = {
"type": "connect_message",
@@ -741,6 +741,8 @@ class WebSocketManager:
self._log("验证码错误错误通知已由PddLogin发送等待后端处理", "INFO")
elif result == "login_failure":
self._log("登录失败失败通知已由PddLogin发送等待后端处理", "INFO")
elif result == "cookie_expired":
self._log("🔄 Cookie已过期过期通知已发送等待后端重新下发Cookie", "INFO")
return result