From 36a9e6e7134485038f739181e2edaac044c32176 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 22 May 2009 06:43:20 +0200 Subject: [PATCH] Only connect to 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 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; + } } /** -- 2.7.4