From e5e14c688e13425b77ac6bf9d952af099ea52de5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 22 May 2009 07:01:29 +0200 Subject: [PATCH] Only disconnect known nodes. --- src/net/pterodactylus/jsite/core/NodeManager.java | 4 ++++ 1 file changed, 4 insertions(+) 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; + } } /** -- 2.7.4