NetDB: Wake up FloodfillMonitor when ff setting changes,

so it will take effect immediately, and log in event log.
Don't queue multiple FloodJobs after changes
This commit is contained in:
zzz
2018-03-10 12:30:17 +00:00
parent 4bcb1d27e4
commit fa85c0c50b
3 changed files with 34 additions and 11 deletions

View File

@ -109,9 +109,8 @@ public class ConfigAdvancedHandler extends FormHandler {
FloodfillNetworkDatabaseFacade fndf = (FloodfillNetworkDatabaseFacade) _context.netDb();
boolean wasFF = fndf.floodfillEnabled();
boolean isFF = _ff.equals("true");
// this will rebuild the RI, log in the event log, etc.
fndf.setFloodfillEnabled(isFF);
if (wasFF != isFF)
_context.router().rebuildRouterInfo();
}
if (saved)
addFormNotice(_t("Configuration saved successfully"));