voice: fix bug where no audio could be heard if voice region changed

This commit is contained in:
Amish Shah 2018-04-07 15:19:18 +01:00
parent 384fdf8f17
commit fa886eaae9
No known key found for this signature in database
GPG key ID: 904349C1207D7967

View file

@ -286,7 +286,7 @@ class VoiceConnection extends EventEmitter {
reconnect(token, endpoint) {
this.authentication.token = token;
this.authentication.endpoint = endpoint;
this.speaking = false;
this.status = VoiceStatus.RECONNECTING;
/**
* Emitted when the voice connection is reconnecting (typically after a region change).
@ -331,7 +331,7 @@ class VoiceConnection extends EventEmitter {
*/
cleanup() {
this.player.destroy();
this.speaking = false;
const { ws, udp } = this.sockets;
if (ws) {