Fix AbstractCommonSubscriber close method
[netconf.git] / restconf / restconf-nb-bierman02 / src / main / java / org / opendaylight / netconf / sal / streams / listeners / AbstractCommonSubscriber.java
index 67cffe212aae075ed6be6d77fa7297e1693c2785..2a7ba619c59a543fcedd6815912b458977396941 100644 (file)
@@ -50,11 +50,12 @@ abstract class AbstractCommonSubscriber extends AbstractQueryParams implements B
     }
 
     @Override
-    public final void close() throws Exception {
-        this.registration.close();
-        this.registration = null;
+    public final void close() {
+        if (registration != null) {
+            this.registration.close();
+            this.registration = null;
+        }
 
-        deleteDataInDS();
         unregister();
     }
 
@@ -67,7 +68,7 @@ abstract class AbstractCommonSubscriber extends AbstractQueryParams implements B
      */
     public void addSubscriber(final Channel subscriber) {
         if (!subscriber.isActive()) {
-            LOG.debug("Channel is not active between websocket server and subscriber {}" + subscriber.remoteAddress());
+            LOG.debug("Channel is not active between websocket server and subscriber {}", subscriber.remoteAddress());
         }
         final Event event = new Event(EventType.REGISTER);
         event.setSubscriber(subscriber);