From: David ‘Bombe’ Roden Date: Wed, 14 May 2008 07:07:41 +0000 (+0000) Subject: fire disconnected event only once X-Git-Tag: v0.1.1~127 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=6ab34aae67d7f0423464eda202f9c03101107db9;p=jFCPlib.git fire disconnected event only once git-svn-id: http://trooper/svn/projects/jFCPlib/branch/high-level-client@873 c3eda9e8-030b-0410-8277-bc7414b0a119 --- diff --git a/src/net/pterodactylus/fcp/highlevel/HighLevelClient.java b/src/net/pterodactylus/fcp/highlevel/HighLevelClient.java index 5de3aa2..b64601d 100644 --- a/src/net/pterodactylus/fcp/highlevel/HighLevelClient.java +++ b/src/net/pterodactylus/fcp/highlevel/HighLevelClient.java @@ -106,7 +106,7 @@ public class HighLevelClient { private final String clientName; /** The FCP connection to the node. */ - private FcpConnection fcpConnection; + private FcpConnection fcpConnection = null; /** Listeners for high-level client events. */ private List highLevelClientListeners = Collections.synchronizedList(new ArrayList()); @@ -518,7 +518,6 @@ public class HighLevelClient { fcpConnection.close(); } fcpConnection = null; - fireClientDisconnected(throwable); } /** @@ -711,6 +710,7 @@ public class HighLevelClient { } cancelIdentifier(null); disconnect(throwable); + fireClientDisconnected(throwable); } /**