mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 09:42:22 +00:00
voice: fix _writeCallback being called multiple times (#2567)
This commit is contained in:
parent
3bfc1ff61c
commit
04618f554f
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue