Close device handler when it fails to connect
[netconf.git] / apps / netconf-topology / src / main / java / org / opendaylight / netconf / topology / spi / AbstractNetconfTopology.java
index 43921f32f5add08f4c6a069bafbf8ef342974eea..b7bcc26313e8cac7c7810954210c4ec4f5024b6c 100644 (file)
@@ -130,7 +130,8 @@ public abstract class AbstractNetconfTopology {
         } catch (IllegalArgumentException e) {
             // This is a workaround for NETCONF-1114 where the encrypted password's lexical structure is not enforced
             // in the datastore and it ends up surfacing when we decrypt the password.
-            LOG.warn("RemoteDevice{{}} failed to connect", nodeId, e);
+            LOG.warn("RemoteDevice{{}} failed to connect, removing from operational datastore", nodeId, e);
+            deviceSalFacade.close();
             return;
         }