mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
voice: fix _writeCallback being called multiple times (#2567)
This commit is contained in:
@@ -199,7 +199,10 @@ class StreamDispatcher extends Writable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_step(done) {
|
_step(done) {
|
||||||
this._writeCallback = done;
|
this._writeCallback = () => {
|
||||||
|
this._writeCallback = null;
|
||||||
|
done();
|
||||||
|
};
|
||||||
if (this.pausedSince) return;
|
if (this.pausedSince) return;
|
||||||
if (!this.streams.broadcast) {
|
if (!this.streams.broadcast) {
|
||||||
const next = FRAME_LENGTH + (this.count * FRAME_LENGTH) - (Date.now() - this.startTime - this.pausedTime);
|
const next = FRAME_LENGTH + (this.count * FRAME_LENGTH) - (Date.now() - this.startTime - this.pausedTime);
|
||||||
|
|||||||
Reference in New Issue
Block a user