From: David ‘Bombe’ Roden Date: Thu, 16 Oct 2014 17:43:40 +0000 (+0200) Subject: Only handle replies if the connection has not been established yet. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=8d04e6a543dc7feec9cf3ff28045a517ba7a2d7a;p=xudocci.git Only handle replies if the connection has not been established yet. --- diff --git a/src/main/java/net/pterodactylus/irc/connection/ConnectionEstablishHandler.java b/src/main/java/net/pterodactylus/irc/connection/ConnectionEstablishHandler.java index da608ca..741ece3 100644 --- a/src/main/java/net/pterodactylus/irc/connection/ConnectionEstablishHandler.java +++ b/src/main/java/net/pterodactylus/irc/connection/ConnectionEstablishHandler.java @@ -34,7 +34,8 @@ public class ConnectionEstablishHandler implements Handler { @Override public boolean willHandle(Reply reply) { - return asList("001", "002", "003", "004").contains(reply.command()); + return !isFinalConnectionStatusReached() && + asList("001", "002", "003", "004").contains(reply.command()); } @Override