优化: ssh-proxy russh 迁移后代码整理

- 移除未使用的 async-trait 依赖
- 添加断线重连逻辑,会话失效时自动重连
- 修复 get_or_create_session TOCTOU 竞态条件
- 日志智能分级: 慢请求告警、退出码识别
- 用 time crate 替换手写日期计算 (删除40行)
- UTF-8 安全截断修复
- 同步优化 mysql-proxy 日志模块
This commit is contained in:
2026-03-21 00:53:27 +08:00
parent 11203f036f
commit f59ed9aae0
9 changed files with 260 additions and 213 deletions

View File

@@ -92,7 +92,7 @@ async fn run_server(config_path: &str, port: Option<u16>, host: Option<String>)
let mut interval = tokio::time::interval(std::time::Duration::from_secs(check_interval));
loop {
interval.tick().await;
manager_clone.cleanup_idle(idle_timeout);
manager_clone.cleanup_idle(idle_timeout).await;
}
});