feat: 心跳检测设置为4秒

This commit is contained in:
caoqianming 2026-03-20 09:58:15 +08:00
parent 8eb1d6671a
commit bf548161a6
1 changed files with 1 additions and 1 deletions

View File

@ -313,7 +313,7 @@ impl ConnectionManager {
let manager = self.clone(); let manager = self.clone();
let handle = tokio::spawn(async move { let handle = tokio::spawn(async move {
let mut ticker = tokio::time::interval(Duration::from_secs(30)); // 每30秒检测一次心跳 let mut ticker = tokio::time::interval(Duration::from_secs(4)); // 每4秒检测一次心跳
ticker.set_missed_tick_behavior(tokio::time::MissedTickBehavior::Skip); ticker.set_missed_tick_behavior(tokio::time::MissedTickBehavior::Skip);
loop { loop {