fix(voice): handle negative timeouts (#11362)

This commit is contained in:
Marko Kajzer
2025-12-17 18:53:10 +00:00
committed by GitHub
parent c4fc79a3cd
commit 5f93fbd0f2
+1 -1
View File
@@ -136,7 +136,7 @@ function prepareNextAudioFrame(players: AudioPlayer[]) {
if (!nextPlayer) {
if (nextTime !== -1) {
audioCycleInterval = setTimeout(() => audioCycleStep(), nextTime - Date.now());
audioCycleInterval = setTimeout(() => audioCycleStep(), Math.max(1, nextTime - Date.now()));
}
return;