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:
@@ -1210,14 +1210,8 @@ void tcp_json_poll(void) {
|
|||||||
goto do_restart;
|
goto do_restart;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auth timeout — 60s 未完成鉴权 → 重启网络接口 (不计数, 正常运维行为)
|
// Auth: 3次失败在 handle_pwd_verify 中直接 tcp_json_restart()
|
||||||
if (g_json_auth_state == JSON_STATE_WAIT_AUTH) {
|
// 5分钟无通信/无连接由上方 do_restart 路径处理
|
||||||
if (mstick() - g_json_auth_timer > TCP_JSON_AUTH_TIMEOUT_MS) {
|
|
||||||
PRINT("JSON: Auth timeout → restart (no count)\n");
|
|
||||||
tcp_json_restart();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Lockout timeout check (existing)
|
// Lockout timeout check (existing)
|
||||||
if (g_json_auth_state == JSON_STATE_LOCKOUT) {
|
if (g_json_auth_state == JSON_STATE_LOCKOUT) {
|
||||||
|
|||||||
Reference in New Issue
Block a user