forked from I2P_Developers/i2p.i2p
2006-02-19 jrandom
* Moved the current net's reseed URL to a different location than where the old net looks (dev.i2p.net/i2pdb2/ vs .../i2pdb/) * More aggressively expire inbound messages (on receive, not just on send) * Add in a hook for breaking backwards compatibility in the SSU wire protocol directly by including a version as part of the handshake. The version is currently set to 0, however, so the wire protocol from this build is compatible with all earlier SSU implementations. * Increased the number of complete message readers, cutting down substantially on the delay processing inbound messages. * Delete the message history file on startup * Reworked the restart/shutdown display on the console (thanks bd_!)
This commit is contained in:
@@ -106,6 +106,7 @@ public class Router {
|
||||
System.exit(-1);
|
||||
}
|
||||
|
||||
_gracefulExitCode = -1;
|
||||
_config = new Properties();
|
||||
|
||||
if (configFilename == null) {
|
||||
@@ -891,17 +892,22 @@ public class Router {
|
||||
*
|
||||
*/
|
||||
public void cancelGracefulShutdown() {
|
||||
_gracefulExitCode = -1;
|
||||
_config.remove(PROP_SHUTDOWN_IN_PROGRESS);
|
||||
synchronized (_gracefulShutdownDetector) {
|
||||
_gracefulShutdownDetector.notifyAll();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* What exit code do we plan on using when we shut down (or -1, if there isn't a graceful shutdown planned)
|
||||
*/
|
||||
public int scheduledGracefulExitCode() { return _gracefulExitCode; }
|
||||
public boolean gracefulShutdownInProgress() {
|
||||
return (null != _config.getProperty(PROP_SHUTDOWN_IN_PROGRESS));
|
||||
}
|
||||
/** How long until the graceful shutdown will kill us? */
|
||||
public long getShutdownTimeRemaining() {
|
||||
if (_gracefulExitCode <= 0) return -1;
|
||||
long exp = _context.tunnelManager().getLastParticipatingExpiration();
|
||||
if (exp < 0)
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user