From b97afe22d52378089817d8a26712767afd5a89d9 Mon Sep 17 00:00:00 2001 From: wangfq Date: Fri, 3 Jul 2026 15:28:00 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=8E=BB=E6=8E=89=2060s=20Auth=20t?= =?UTF-8?q?imeout,=20=E6=94=B9=E4=B8=BA=203=E6=AC=A1=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E5=8D=B3=E9=87=8D=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除 tcp_json_poll 中的 Auth timeout 60s 超时检查 - Auth 失败逻辑已在 handle_pwd_verify: 3次失败→tcp_json_restart() - 连接后无交互场景由 5min 空闲检查覆盖 --- .../BLE/OnlyUpdateApp_Peripheral/APP/tcp_json_srv.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/tcp_json_srv.c b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/tcp_json_srv.c index 4a9bb62..ef21a8b 100644 --- a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/tcp_json_srv.c +++ b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/tcp_json_srv.c @@ -1210,14 +1210,8 @@ void tcp_json_poll(void) { goto do_restart; } - // Auth timeout — 60s 未完成鉴权 → 重启网络接口 (不计数, 正常运维行为) - if (g_json_auth_state == JSON_STATE_WAIT_AUTH) { - if (mstick() - g_json_auth_timer > TCP_JSON_AUTH_TIMEOUT_MS) { - PRINT("JSON: Auth timeout → restart (no count)\n"); - tcp_json_restart(); - return; - } - } + // Auth: 3次失败在 handle_pwd_verify 中直接 tcp_json_restart() + // 5分钟无通信/无连接由上方 do_restart 路径处理 // Lockout timeout check (existing) if (g_json_auth_state == JSON_STATE_LOCKOUT) {