Skip to content

Commit

Permalink
Server side
Browse files Browse the repository at this point in the history
  • Loading branch information
Repulser committed Dec 7, 2017
1 parent 59cde37 commit 7b9ad51
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public void onMessage(WebSocket webSocket, String s) {

if (webSocket.isClosing()) {
log.error("Ignoring closing websocket: " + webSocket.getRemoteSocketAddress().toString());
return;
}

switch (json.getString("op")) {
Expand All @@ -119,11 +120,6 @@ public void onMessage(WebSocket webSocket, String s) {
if (manager.getConnectionListener() == null) {
manager.setConnectionListener(new DebugConnectionListener(guildId));
}
if (manager.isConnected() || manager.isAttemptingToConnect()) {
manager.closeAudioConnection();
log.info("Closing the audio connection for guild {} so we can reconnect.", guildId);
}

manager.openAudioConnection(json.getString("channelId"));
break;
case "voiceUpdate":
Expand Down

0 comments on commit 7b9ad51

Please sign in to comment.