From d1ec38be6ca58fb782aeb413c1b238b23c02c00a Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 16 Oct 2014 21:51:23 +0200 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20store=20connection=20status=20an?= =?utf8?q?ymore.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/irc/Connection.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 { -- 2.7.4