From: David ‘Bombe’ Roden Date: Thu, 16 Oct 2014 19:51:23 +0000 (+0200) Subject: Don’t store connection status anymore. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=d1ec38be6ca58fb782aeb413c1b238b23c02c00a;p=xudocci.git Don’t store connection status anymore. --- diff --git a/src/main/java/net/pterodactylus/irc/Connection.java b/src/main/java/net/pterodactylus/irc/Connection.java index 86de535..4d601fd 100644 --- a/src/main/java/net/pterodactylus/irc/Connection.java +++ b/src/main/java/net/pterodactylus/irc/Connection.java @@ -374,8 +374,6 @@ public class Connection extends AbstractExecutionThreadService implements Servic /* now read replies and react. */ try { /* some status variables. */ - int oldConnectionStatus = 0; - int connectionStatus = 0; boolean connected = true; StringBuilder motd = new StringBuilder(); Set nicks = Sets.newHashSet(); @@ -432,7 +430,7 @@ public class Connection extends AbstractExecutionThreadService implements Servic } else if (command.equals("431")) { eventBus.post(new NoNicknameGivenReceived(this, reply)); } else if (command.equals("433")) { - if (connectionStatus == 0) { + if (!established.get()) { nickname = nicknameChooser.getNickname(); connectionHandler.sendCommand("NICK", nickname); } else {