only fire connection-closed event once
[jFCPlib.git] / src / net / pterodactylus / fcp / FcpConnection.java
index d7ed4bc..d1a1be7 100644 (file)
@@ -831,8 +831,8 @@ public class FcpConnection implements Closeable {
                if (connectionHandler != null) {
                        connectionHandler.stop();
                        connectionHandler = null;
+                       fireConnectionClosed(throwable);
                }
-               fireConnectionClosed(throwable);
        }
 
        //