I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit a2f027e1 authored by zzz's avatar zzz
Browse files

NetDB: Don't publish non-ff RI on exit if we are coming right back

parent cb4359cd
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,7 @@ class FloodfillMonitorJob extends JobImpl {
private static final int MIN_FF = 5000;
private static final int MAX_FF = 999999;
private static final String PROP_FLOODFILL_PARTICIPANT = "router.floodfillParticipant";
static final String PROP_FLOODFILL_PARTICIPANT = "router.floodfillParticipant";
public FloodfillMonitorJob(RouterContext context, FloodfillNetworkDatabaseFacade facade) {
super(context);
......
......@@ -94,7 +94,11 @@ public class FloodfillNetworkDatabaseFacade extends KademliaNetworkDatabaseFacad
*/
@Override
public synchronized void shutdown() {
if (_floodfillEnabled) {
// only if not forced ff or not restarting
if (_floodfillEnabled &&
(!_context.getBooleanProperty(FloodfillMonitorJob.PROP_FLOODFILL_PARTICIPANT) ||
!(_context.router().scheduledGracefulExitCode() == Router.EXIT_HARD_RESTART ||
_context.router().scheduledGracefulExitCode() == Router.EXIT_GRACEFUL_RESTART))) {
// turn off to build a new RI...
_floodfillEnabled = false;
// true -> publish inline
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment