keep publishing leaseset if we are restarting, to minimize downtime
This commit is contained in:
@ -490,8 +490,13 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
|
|||||||
}
|
}
|
||||||
if (!_context.clientManager().shouldPublishLeaseSet(h))
|
if (!_context.clientManager().shouldPublishLeaseSet(h))
|
||||||
return;
|
return;
|
||||||
if (_context.router().gracefulShutdownInProgress())
|
// 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;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
RepublishLeaseSetJob j = null;
|
RepublishLeaseSetJob j = null;
|
||||||
synchronized (_publishingLeaseSets) {
|
synchronized (_publishingLeaseSets) {
|
||||||
|
Reference in New Issue
Block a user