Skip to content

Commit c362ba0

Browse files
committed
voice: more debug
1 parent fe51b4e commit c362ba0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/client/voice/networking/VoiceWebSocket.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ class VoiceWebSocket extends EventEmitter {
6868
}
6969

7070
this.attempts++;
71-
this.emit('debug', `[WS] connecting, ${this.attempts} attempts, wss://${this.connection.authentication.endpoint}/`);
7271

7372
/**
7473
* The actual WebSocket used to connect to the Voice WebSocket Server.
7574
* @type {WebSocket}
7675
*/
7776
this.ws = WebSocket.create(`wss://${this.connection.authentication.endpoint}/`, { v: 4 });
77+
this.emit('debug', `[WS] connecting, ${this.attempts} attempts, ${this.ws.url}`);
7878
this.ws.onopen = this.onOpen.bind(this);
7979
this.ws.onmessage = this.onMessage.bind(this);
8080
this.ws.onclose = this.onClose.bind(this);
@@ -154,6 +154,7 @@ class VoiceWebSocket extends EventEmitter {
154154
* @param {Error} error The error that occurred
155155
*/
156156
onError(error) {
157+
this.emit('debug', `[WS] Error: ${error}`);
157158
this.emit('error', error);
158159
}
159160

0 commit comments

Comments
 (0)