mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Don't poll plugins that don't support polling.
This commit is contained in:
@@ -45,12 +45,13 @@ class PollerImpl implements Poller {
|
||||
|
||||
public void addPlugin(Plugin p) {
|
||||
// Randomise first polling interval
|
||||
schedule(p, randomise(p.getPollingInterval()), false);
|
||||
if (p.shouldPoll())
|
||||
schedule(p, randomise(p.getPollingInterval()), false);
|
||||
}
|
||||
|
||||
public void pollNow(Plugin p) {
|
||||
// Randomise next polling interval
|
||||
schedule(p, 0, true);
|
||||
if (p.shouldPoll()) schedule(p, 0, true);
|
||||
}
|
||||
|
||||
private int randomise(int interval) {
|
||||
|
||||
Reference in New Issue
Block a user