Skip to content

Commit

Permalink
voice: more debug information, correctly listen to vws
Browse files Browse the repository at this point in the history
  • Loading branch information
amishshah committed Feb 11, 2019
1 parent 375706b commit fe51b4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/client/voice/VoiceConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down
3 changes: 1 addition & 2 deletions src/client/voice/networking/VoiceWebSocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class VoiceWebSocket extends EventEmitter {
*/
this.attempts = 0;

this.connect();
this.dead = false;
this.connection.on('closing', this.shutdown.bind(this));
}
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit fe51b4e

Please sign in to comment.