From c362ba0dd549ac0a2be850b81966ffa29b030db5 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 11 Feb 2019 18:37:33 +0000 Subject: [PATCH] voice: more debug --- src/client/voice/networking/VoiceWebSocket.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/voice/networking/VoiceWebSocket.js b/src/client/voice/networking/VoiceWebSocket.js index e238c62bd..3720afa74 100644 --- a/src/client/voice/networking/VoiceWebSocket.js +++ b/src/client/voice/networking/VoiceWebSocket.js @@ -68,13 +68,13 @@ class VoiceWebSocket extends EventEmitter { } this.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. * @type {WebSocket} */ this.ws = WebSocket.create(`wss://${this.connection.authentication.endpoint}/`, { v: 4 }); + this.emit('debug', `[WS] connecting, ${this.attempts} attempts, ${this.ws.url}`); this.ws.onopen = this.onOpen.bind(this); this.ws.onmessage = this.onMessage.bind(this); this.ws.onclose = this.onClose.bind(this); @@ -154,6 +154,7 @@ class VoiceWebSocket extends EventEmitter { * @param {Error} error The error that occurred */ onError(error) { + this.emit('debug', `[WS] Error: ${error}`); this.emit('error', error); }