Merge "Change in AbstractRaftBehavior#performSnapshotWithoutCapture"
[controller.git] / opendaylight / md-sal / sal-netconf-connector / src / main / java / org / opendaylight / controller / sal / connect / netconf / listener / NetconfDeviceCommunicator.java
index 8553820b40095755d4ee82361d184cbf5590fc9e..ce5aa79af0f85c44dc0beaa68650597f4974213a 100644 (file)
@@ -86,7 +86,7 @@ public class NetconfDeviceCommunicator implements NetconfClientSessionListener,
             logger.trace("{}: Session advertised capabilities: {}", id, netconfSessionPreferences);
 
             if(overrideNetconfCapabilities.isPresent()) {
-                netconfSessionPreferences = netconfSessionPreferences.replaceModuleCaps(overrideNetconfCapabilities.get());
+                netconfSessionPreferences = netconfSessionPreferences.addModuleCaps(overrideNetconfCapabilities.get());
                 logger.debug("{}: Session capabilities overridden, capabilities that will be used: {}", id, netconfSessionPreferences);
             }
 
@@ -248,6 +248,10 @@ public class NetconfDeviceCommunicator implements NetconfClientSessionListener,
 
                 request.future.set( RpcResultBuilder.<NetconfMessage>failed()
                         .withRpcError( NetconfMessageTransformUtil.toRpcError( e ) ).build() );
+
+                //recursively processing message to eventually find matching request
+                processMessage(message);
+
                 return;
             }