* Router: Move router.ping file from temp directory to config directory

This commit is contained in:
zzz
2011-11-16 00:56:45 +00:00
parent 97fe1baf6a
commit ff499844a2
3 changed files with 26 additions and 15 deletions

View File

@@ -1555,7 +1555,7 @@ public class Router implements RouterClock.ClockShiftListener {
*/
private void beginMarkingLiveliness() {
File f = getPingFile();
SimpleScheduler.getInstance().addPeriodicEvent(new MarkLiveliness(this, f), 0, LIVELINESS_DELAY);
SimpleScheduler.getInstance().addPeriodicEvent(new MarkLiveliness(this, f), 0, LIVELINESS_DELAY - (5*1000));
}
public static final String PROP_BANDWIDTH_SHARE_PERCENTAGE = "router.sharePercentage";
@@ -1812,11 +1812,12 @@ private static class UpdateRoutingKeyModifierJob extends JobImpl {
}
/**
* Write a timestamp to the ping file where the wrapper can see it
* Write a timestamp to the ping file where
* other routers trying to use the same configuration can see it
*/
private static class MarkLiveliness implements SimpleTimer.TimedEvent {
private Router _router;
private File _pingFile;
private final Router _router;
private final File _pingFile;
public MarkLiveliness(Router router, File pingFile) {
_router = router;

View File

@@ -117,9 +117,7 @@ public class RouterContext extends I2PAppContext {
* @param value The new value for the property.
*/
public void setProperty(String propName, String value) {
if(_overrideProps != null) {
_overrideProps.setProperty(propName, value);
}
}