A race condition occurs between ARPHandler and HostTracker if the ARP
[controller.git] / opendaylight / hosttracker / implementation / src / main / java / org / opendaylight / controller / hosttracker / internal / HostTracker.java
index af983b3c8b70b61ee804f3d3af8837d2f917bc53..aa1c8592d9225f997d7906e7dbb3e679b5f0f270 100644 (file)
@@ -324,15 +324,15 @@ public class HostTracker implements IfIptoHost, IfHostListener, ISwitchManagerAw
             return host;
         }
 
-        /* host is not found, initiate a discovery */
-
-        hostFinder.find(networkAddress);
-
-        /* Also add this host to ARPPending List for any potential retries */
+        /* Add this host to ARPPending List for any potential retries */
 
         AddtoARPPendingList(networkAddress);
         logger.debug("hostFind(): Host Not Found for IP: {}, Inititated Host Discovery ...",
                 networkAddress.getHostAddress());
+
+        /* host is not found, initiate a discovery */
+
+        hostFinder.find(networkAddress);
         return null;
     }