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