Bug 2483 - Removed confusing WARN log on successful RPC 16/13416/2
authorMichal Polkorab <michal.polkorab@pantheon.sk>
Fri, 5 Dec 2014 13:22:59 +0000 (14:22 +0100)
committerMichal Polkorab <michal.polkorab@pantheon.sk>
Mon, 8 Dec 2014 09:59:58 +0000 (10:59 +0100)
Change-Id: Ie73209b265267fed357f6a9b6d4ce93c12c51373
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/connection/ConnectionAdapterImpl.java

index 9fe040fcc4fbb630966a21f45ec8949e030a7bf2..11e8336033e65cd78ee4daae3c04d91dfaa7d1d7 100644 (file)
@@ -71,6 +71,7 @@ import org.slf4j.LoggerFactory;
 import com.google.common.base.Preconditions;
 import com.google.common.cache.Cache;
 import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.RemovalCause;
 import com.google.common.cache.RemovalListener;
 import com.google.common.cache.RemovalNotification;
 import com.google.common.util.concurrent.ListenableFuture;
@@ -100,10 +101,13 @@ public class ConnectionAdapterImpl implements ConnectionFacade {
     private static final String TAG = "OPENFLOW";
     private static final RemovalListener<RpcResponseKey, ResponseExpectedRpcListener<?>> REMOVAL_LISTENER =
             new RemovalListener<RpcResponseKey, ResponseExpectedRpcListener<?>>() {
+
         @Override
         public void onRemoval(
                 final RemovalNotification<RpcResponseKey, ResponseExpectedRpcListener<?>> notification) {
-            notification.getValue().discard();
+            if (! notification.getCause().equals(RemovalCause.EXPLICIT)) {
+                notification.getValue().discard();
+            }
         }
     };