keep publishing leaseset if we are restarting, to minimize downtime

This commit is contained in:
zzz
2009-08-27 15:29:23 +00:00
parent 787def6a1c
commit e0dd1f13e3

View File

@ -490,8 +490,13 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
}
if (!_context.clientManager().shouldPublishLeaseSet(h))
return;
if (_context.router().gracefulShutdownInProgress())
return;
// If we're exiting, don't publish.
// If we're restarting, keep publishing to minimize the downtime.
if (_context.router().gracefulShutdownInProgress()) {
int code = _context.router().scheduledGracefulExitCode();
if (code == Router.EXIT_GRACEFUL || code == Router.EXIT_HARD)
return;
}
RepublishLeaseSetJob j = null;
synchronized (_publishingLeaseSets) {