X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fhosttracker%2Fimplementation%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fhosttracker%2Finternal%2FHostTracker.java;h=5aa8f10706cae4e774455895fc30642a1fa8049d;hp=6b7bac03e9bdcfc472ad3dce7cc2c10d1f8dd096;hb=a2e03732c76b35b28622be16bd3c1c0c5bd7c2b5;hpb=4731ee462f09ad75d31a175b0dd5abfa11eb2b6a diff --git a/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java b/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java index 6b7bac03e9..5aa8f10706 100644 --- a/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java +++ b/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java @@ -97,7 +97,7 @@ public class HostTracker implements IfIptoHost, IfHostListener, ISwitchManagerAw private Timer timer; private Timer arp_refresh_timer; private String containerName = null; - + private ExecutorService executor; private static class ARPPending { protected InetAddress hostIP; protected short sent_count; @@ -158,7 +158,7 @@ public class HostTracker implements IfIptoHost, IfHostListener, ISwitchManagerAw timer = new Timer(); timer.schedule(new OutStandingARPHandler(), 4000, 4000); - + executor = Executors.newFixedThreadPool(2); /* ARP Refresh Timer to go off every 5 seconds to implement ARP aging */ arp_refresh_timer = new Timer(); arp_refresh_timer.schedule(new ARPRefreshHandler(), 5000, 5000); @@ -296,7 +296,6 @@ public class HostTracker implements IfIptoHost, IfHostListener, ISwitchManagerAw @Override public Future discoverHost(InetAddress networkAddress) { - ExecutorService executor = Executors.newFixedThreadPool(1); if (executor == null) { logger.error("discoverHost: Null executor"); return null; @@ -1349,6 +1348,7 @@ public class HostTracker implements IfIptoHost, IfHostListener, ISwitchManagerAw * */ void stop() { + executor.shutdown(); } @Override