voice: fix write after end (#2567)

This commit is contained in:
Amish Shah
2018-06-13 21:02:19 +01:00
parent d69e906027
commit 3bfc1ff61c

View File

@@ -214,6 +214,11 @@ class StreamDispatcher extends Writable {
this.count++;
}
_final(callback) {
this._writeCallback = null;
callback();
}
_playChunk(chunk) {
if (this.player.dispatcher !== this || !this.player.voiceConnection.authentication.secretKey) return;
this._setSpeaking(true);