From fe51b4e89b2f4ea256fb20ad44810e7f64ac8b53 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 11 Feb 2019 18:28:37 +0000 Subject: [PATCH] voice: more debug information, correctly listen to vws --- src/client/voice/VoiceConnection.js | 2 ++ src/client/voice/networking/VoiceWebSocket.js | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client/voice/VoiceConnection.js b/src/client/voice/VoiceConnection.js index 6a945731c..d0922ae81 100644 --- a/src/client/voice/VoiceConnection.js +++ b/src/client/voice/VoiceConnection.js @@ -413,6 +413,8 @@ class VoiceConnection extends EventEmitter { ws.on('ready', this.onReady.bind(this)); ws.on('sessionDescription', this.onSessionDescription.bind(this)); ws.on('speaking', this.onSpeaking.bind(this)); + + this.sockets.ws.connect(); } /** diff --git a/src/client/voice/networking/VoiceWebSocket.js b/src/client/voice/networking/VoiceWebSocket.js index ea2db4395..e238c62bd 100644 --- a/src/client/voice/networking/VoiceWebSocket.js +++ b/src/client/voice/networking/VoiceWebSocket.js @@ -25,7 +25,6 @@ class VoiceWebSocket extends EventEmitter { */ this.attempts = 0; - this.connect(); this.dead = false; this.connection.on('closing', this.shutdown.bind(this)); } @@ -69,7 +68,7 @@ class VoiceWebSocket extends EventEmitter { } this.attempts++; - this.emit('debug', `[WS] connecting with ${this.attempts} attempts`); + this.emit('debug', `[WS] connecting, ${this.attempts} attempts, wss://${this.connection.authentication.endpoint}/`); /** * The actual WebSocket used to connect to the Voice WebSocket Server.