Only handle replies if the connection has not been established yet.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 16 Oct 2014 17:43:40 +0000 (19:43 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 16 Oct 2014 17:43:40 +0000 (19:43 +0200)
src/main/java/net/pterodactylus/irc/connection/ConnectionEstablishHandler.java

index da608ca..741ece3 100644 (file)
@@ -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