UPnP: map port again if we are not reachable (e.g. when router rebooted)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7419 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
lotus 2011-01-02 21:17:21 +00:00
parent b1484299b2
commit 0e54233408
2 changed files with 4 additions and 1 deletions

View File

@ -1671,6 +1671,9 @@ public final class Switchboard extends serverSwitch {
// update the cluster set
this.clusterhashes = this.peers.clusterHashes(getConfig("cluster.peers.yacydomain", ""));
// check if we are reachable and try to map port again if not (e.g. when router rebooted)
if(getConfigBool(SwitchboardConstants.UPNP_ENABLED, false) && sb.peers.mySeed().isJunior())
UPnP.addPortMapping();
// after all clean up is done, check the resource usage
observer.resourceObserverJob();

View File

@ -157,7 +157,7 @@ public final class yacy {
try {
"a".codePointAt(0); // needs at least Java 1.5
} catch (final NoSuchMethodError e) {
System.err.println("STARTUP: Java Version too low. You need at least Java 1.5 to run YaCy");
System.err.println("STARTUP: Java Version too low. You need at least Java 1.5 to run YaCy"); // TODO: is 1.6 now
Thread.sleep(3000);
System.exit(-1);
}