From 8d04e6a543dc7feec9cf3ff28045a517ba7a2d7a Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 16 Oct 2014 19:43:40 +0200 Subject: [PATCH] Only handle replies if the connection has not been established yet. --- .../net/pterodactylus/irc/connection/ConnectionEstablishHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.7.4