Merge "Gracefully stop HT threads when the bundle is being stopped (cache terminated...
[controller.git] / opendaylight / hosttracker / implementation / src / main / java / org / opendaylight / controller / hosttracker / internal / HostTrackerCallable.java
index 0af523aaa9b22dbedd7f54d0da0edf26b6e0aecb..303308270d77d36eb803b42feca3096bbfeed0fb 100644 (file)
@@ -1,4 +1,3 @@
-
 /*
  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
  *
@@ -15,8 +14,8 @@ package org.opendaylight.controller.hosttracker.internal;
 
 /**
  * This Class provides methods to discover Host through a blocking call
- * mechanism. Applications can make use of these methods if they don't 
- * find a host in HostTracker's database and want to discover the host  
+ * mechanism. Applications can make use of these methods if they don't
+ * find a host in HostTracker's database and want to discover the host
  * in the same thread without being called by a callback function.
  */
 import java.net.InetAddress;
@@ -43,7 +42,7 @@ public class HostTrackerCallable implements Callable<HostNodeConnector> {
         if (h != null)
             return h;
         hostTracker.setCallableOnPendingARP(trackedHost, this);
-        latch.await();
+        Thread.sleep(2000); // wait 2sec to see if the host responds
         return hostTracker.hostQuery(trackedHost);
     }