From: David ‘Bombe’ Roden Date: Fri, 22 May 2009 05:06:45 +0000 (+0200) Subject: Add node disconnection. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=06d151396a67e242dee58da25829f8b39eb87ef6;p=jSite2.git Add node disconnection. --- diff --git a/src/net/pterodactylus/jsite/core/NodeManager.java b/src/net/pterodactylus/jsite/core/NodeManager.java index e8fd278..2ab728f 100644 --- a/src/net/pterodactylus/jsite/core/NodeManager.java +++ b/src/net/pterodactylus/jsite/core/NodeManager.java @@ -347,6 +347,13 @@ public class NodeManager implements Iterable, PropertyChangeListener { logger.log(Level.WARNING, "Was told to disconnect from a node (" + node + ") I don’t know about!"); return; } + FcpClient fcpClient = nodeClients.get(node); + if (fcpClient == null) { + logger.log(Level.WARNING, "No FCP client for node (" + node + ")!"); + return; + } + fcpClient.disconnect(); + nodeListenerSupport.fireNodeDisconnected(node, null); } /**