Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Bugfix to "-UNRESOLVED_PATTERN- bei Hostname-Änderung" (http://www.yacy-forum.de/viewtopic.php?t=3093)
(no author)24ac4e886013
diff --git a/source/de/anomic/server/serverCore.java b/source/de/anomic/server/serverCore.javaindex bd25a2cde..e16c4c5d7 100644--- a/source/de/anomic/server/serverCore.java+++ b/source/de/anomic/server/serverCore.java@@ -466,10 +466,15 @@ public final class serverCore extends serverAbstractThread implements serverThrepublic static InetAddress publicLocalIP() {try {-+ String hostName;+ try {+ hostName = InetAddress.getLocalHost().getHostName();+ } catch (java.net.UnknownHostException e) {+ hostName = "localhost"; // hopin' nothing serious happened only the hostname changed while running yacy+ System.err.println("ERROR: (internal) " + e.getMessage());+ }// list all addresses- //InetAddress[] ia = InetAddress.getAllByName("localhost");- InetAddress[] ia = InetAddress.getAllByName(InetAddress.getLocalHost().getHostName());+ InetAddress[] ia = InetAddress.getAllByName(hostName);//for (int i = 0; i < ia.length; i++) System.out.println("IP: " + ia[i].getHostAddress()); // DEBUGif (ia.length == 0) {try {