Add node disconnection.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 22 May 2009 05:06:45 +0000 (07:06 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 22 May 2009 05:06:45 +0000 (07:06 +0200)
src/net/pterodactylus/jsite/core/NodeManager.java

index e8fd278..2ab728f 100644 (file)
@@ -347,6 +347,13 @@ public class NodeManager implements Iterable<Node>, 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);
        }
 
        /**