From 32bd2a61c1e741c099ba0b788631bdd51c49f691 Mon Sep 17 00:00:00 2001 From: reger Date: Thu, 10 Jul 2014 02:09:26 +0200 Subject: [PATCH] add local ip to AbstractRemoteHandler local hostname cache --- source/net/yacy/http/AbstractRemoteHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/net/yacy/http/AbstractRemoteHandler.java b/source/net/yacy/http/AbstractRemoteHandler.java index 776e8362c..4e779ec4f 100644 --- a/source/net/yacy/http/AbstractRemoteHandler.java +++ b/source/net/yacy/http/AbstractRemoteHandler.java @@ -49,7 +49,7 @@ import org.eclipse.jetty.server.Request; */ abstract public class AbstractRemoteHandler extends ConnectHandler implements Handler { - protected Switchboard sb = null; + protected Switchboard sb = null; private List localVirtualHostNames; // list for quick check for req to local peer @Override @@ -66,6 +66,7 @@ abstract public class AbstractRemoteHandler extends ConnectHandler implements Ha if (localInetAddress != null) { if (!localVirtualHostNames.contains(localInetAddress.getHostName())) { localVirtualHostNames.add(localInetAddress.getHostName()); + localVirtualHostNames.add(localInetAddress.getHostAddress()); // same as getServer().getURI().getHost() } if (!localVirtualHostNames.contains(localInetAddress.getCanonicalHostName())) {