forked from I2P_Developers/i2p.i2p
* Console:
- config.jsp now cause graceful restart * UPnP: - Tweak to help startup problems * UDP: - Only save IP when it changes
This commit is contained in:
@@ -30,7 +30,7 @@ public class UPnPManager {
|
||||
private RouterContext _context;
|
||||
private UPnP _upnp;
|
||||
private UPnPCallback _upnpCallback;
|
||||
private boolean _isRunning;
|
||||
private volatile boolean _isRunning;
|
||||
private InetAddress _detectedAddress;
|
||||
private TransportManager _manager;
|
||||
/**
|
||||
|
@@ -477,9 +477,12 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
// queue a country code lookup of the new IP
|
||||
_context.commSystem().queueLookup(ourIP);
|
||||
// store these for laptop-mode (change ident on restart... or every time... when IP changes)
|
||||
_context.router().setConfigSetting(PROP_IP, _externalListenHost.getHostAddress());
|
||||
_context.router().setConfigSetting(PROP_IP_CHANGE, "" + _context.clock().now());
|
||||
_context.router().saveConfig();
|
||||
String oldIP = _context.getProperty(PROP_IP);
|
||||
if (!_externalListenHost.getHostAddress().equals(oldIP)) {
|
||||
_context.router().setConfigSetting(PROP_IP, _externalListenHost.getHostAddress());
|
||||
_context.router().setConfigSetting(PROP_IP_CHANGE, "" + _context.clock().now());
|
||||
_context.router().saveConfig();
|
||||
}
|
||||
_context.router().rebuildRouterInfo();
|
||||
}
|
||||
_testEvent.forceRun();
|
||||
|
Reference in New Issue
Block a user