Jon Hall

[ONOS-2880] Initialize SuppressionRules before use

Change-Id: Icefce8109faa1732a5d2c7989695874775926977
......@@ -239,6 +239,7 @@ public class LLDPLinkProvider extends AbstractProvider implements LinkProvider {
deviceService.addListener(deviceListener);
packetService.addProcessor(packetProcessor, PacketProcessor.advisor(0));
loadSuppressionRules();
loadDevices();
executor = newSingleThreadScheduledExecutor(groupedThreads("onos/link", "discovery-%d"));
......@@ -247,7 +248,6 @@ public class LLDPLinkProvider extends AbstractProvider implements LinkProvider {
executor.scheduleAtFixedRate(new LinkPrunerTask(),
LINK_PRUNER_DELAY, LINK_PRUNER_DELAY, SECONDS);
loadSuppressionRules();
requestIntercepts();
}
......
......@@ -104,8 +104,12 @@ class LinkDiscovery implements TimerTask {
}
synchronized void stop() {
isStopped = true;
timeout.cancel();
if (!isStopped) {
isStopped = true;
timeout.cancel();
} else {
log.warn("LinkDiscovery stopped multiple times?");
}
}
synchronized void start() {
......