refactor: 去掉 60s Auth timeout, 改为 3次失败即重启

- 删除 tcp_json_poll 中的 Auth timeout 60s 超时检查
- Auth 失败逻辑已在 handle_pwd_verify: 3次失败→tcp_json_restart()
- 连接后无交互场景由 5min 空闲检查覆盖
This commit is contained in:
wangfq
2026-07-03 15:28:00 +08:00
parent fe69855dc9
commit b97afe22d5
@@ -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) {