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
No known key found for this signature in database
GPG key ID: 904349C1207D7967

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);