forked from I2P_Developers/i2p.i2p
2005-10-31 jrandom
* Fix for some syndie reply scenarios (thanks identiguy and CofE!) * Removed a potentially infinitely recursive call (oops) (forgot to commit this file before. oops)
This commit is contained in:
@@ -41,6 +41,7 @@ import net.i2p.stat.Rate;
|
||||
import net.i2p.stat.RateStat;
|
||||
import net.i2p.util.FileUtil;
|
||||
import net.i2p.util.I2PThread;
|
||||
import net.i2p.util.SimpleTimer;
|
||||
import net.i2p.util.Log;
|
||||
|
||||
/**
|
||||
@@ -326,14 +327,20 @@ public class Router {
|
||||
}
|
||||
ri.sign(key);
|
||||
setRouterInfo(ri);
|
||||
SimpleTimer.getInstance().addEvent(new Republish(), 0);
|
||||
} catch (DataFormatException dfe) {
|
||||
_log.log(Log.CRIT, "Internal error - unable to sign our own address?!", dfe);
|
||||
}
|
||||
}
|
||||
|
||||
private class Republish implements SimpleTimer.TimedEvent {
|
||||
public void timeReached() {
|
||||
try {
|
||||
_context.netDb().publish(ri);
|
||||
_context.netDb().publish(getRouterInfo());
|
||||
} catch (IllegalArgumentException iae) {
|
||||
_log.log(Log.CRIT, "Local router info is invalid? rebuilding a new identity", iae);
|
||||
rebuildNewIdentity();
|
||||
}
|
||||
} catch (DataFormatException dfe) {
|
||||
_log.log(Log.CRIT, "Internal error - unable to sign our own address?!", dfe);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user