Handle EOS Timeout for the Hwvtep Node addition.
[ovsdb.git] / hwvtepsouthbound / hwvtepsouthbound-impl / src / main / java / org / opendaylight / ovsdb / hwvtepsouthbound / HwvtepConnectionManager.java
index 440899b842d815bca96a2042b3584173b33a51b1..864dcaf209bc07000b6051cf5a5570751eeb4723 100644 (file)
@@ -128,6 +128,10 @@ public class HwvtepConnectionManager implements OvsdbConnectionListener, AutoClo
                         externalClient.getConnectionInfo().getLocalPort());
                 hwClient = connectedButCallBacksNotRegistered(externalClient);
                 registerEntityForOwnership(hwClient);
+                HwvtepOperGlobalListener.runAfterTimeoutIfNodeNotCreated(hwClient.getInstanceIdentifier(), () -> {
+                    externalClient.disconnect();
+                    disconnected(externalClient);
+                });
             }
         } catch (InterruptedException | ExecutionException | TimeoutException e) {
             LOG.warn("Unable to fetch Database list from device {}. Disconnecting from the device.",