mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(voice): handle negative timeouts (#11362)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user