From: David ‘Bombe’ Roden Date: Fri, 22 May 2009 05:01:29 +0000 (+0200) Subject: Only disconnect known nodes. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=e5e14c688e13425b77ac6bf9d952af099ea52de5;p=jSite2.git Only disconnect known nodes. --- diff --git a/src/net/pterodactylus/jsite/core/NodeManager.java b/src/net/pterodactylus/jsite/core/NodeManager.java index 74221d4..e8fd278 100644 --- a/src/net/pterodactylus/jsite/core/NodeManager.java +++ b/src/net/pterodactylus/jsite/core/NodeManager.java @@ -343,6 +343,10 @@ public class NodeManager implements Iterable, PropertyChangeListener { */ public void disconnect(Node node) { logger.log(Level.FINEST, "disconnect(node=" + node + ")"); + if (!nodes.contains(node)) { + logger.log(Level.WARNING, "Was told to disconnect from a node (" + node + ") I don’t know about!"); + return; + } } /**