voice: fix StreamDispatcher#pause trying to call null function

This commit is contained in:
Amish Shah
2018-08-13 17:54:11 +01:00
parent bfde1dd8f2
commit 6852a15cee

View File

@@ -123,7 +123,7 @@ class StreamDispatcher extends Writable {
pause() { pause() {
if (this.paused) return; if (this.paused) return;
if (this.streams.opus) this.streams.opus.unpipe(this); if (this.streams.opus) this.streams.opus.unpipe(this);
this._writeCallback(); if (this._writeCallback) this._writeCallback();
this._setSpeaking(false); this._setSpeaking(false);
this.pausedSince = Date.now(); this.pausedSince = Date.now();
} }