Revert "chore: 修改间隔"

This reverts commit 0c8fbafd3f.
This commit is contained in:
Del Wang
2025-12-31 22:53:33 +08:00
committed by Del
parent 84c332d742
commit 41be071b60
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -70,7 +70,7 @@ impl Mixer {
if clients.is_empty() { if clients.is_empty() {
drop(clients); drop(clients);
// 没有客户端时,稍微等待,避免空转 // 没有客户端时,稍微等待,避免空转
tokio::time::sleep(tokio::time::Duration::from_millis(10)).await; tokio::time::sleep(tokio::time::Duration::from_millis(1)).await;
continue; continue;
} }
@@ -117,7 +117,7 @@ impl Mixer {
} else { } else {
// 如果所有客户端都断开了,继续等待新连接 // 如果所有客户端都断开了,继续等待新连接
drop(clients); drop(clients);
tokio::time::sleep(tokio::time::Duration::from_millis(10)).await; tokio::time::sleep(tokio::time::Duration::from_millis(1)).await;
} }
} }
} }
+1 -1
View File
@@ -184,7 +184,7 @@ async fn handle_connection(role: ChannelRole) -> Result<()> {
let len = codec.decode(&data, &mut pcm_buf)?; let len = codec.decode(&data, &mut pcm_buf)?;
player.write(&pcm_buf[..len])?; player.write(&pcm_buf[..len])?;
} else { } else {
tokio::time::sleep(Duration::from_millis(10)).await; tokio::time::sleep(Duration::from_millis(1)).await;
} }
} }
} }