Skip to content
Snippets Groups Projects
Unverified Commit 04a1f2b1 authored by akwizgran's avatar akwizgran
Browse files

Don't poll plugins that don't support polling.

parent 90f3d33f
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
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