Bug 5689: Unhandled message is causing failure 08/38308/3
authorMilos Fabian <milfabia@cisco.com>
Tue, 19 Apr 2016 11:46:21 +0000 (13:46 +0200)
committerMilos Fabian <milfabia@cisco.com>
Thu, 12 May 2016 21:43:05 +0000 (21:43 +0000)
A write transaction is created when message is recieved,
however in case the message is not handled
(i.e. PcError Message without SRP), the transaction
is not sumbitted, which casuse a race with the next transaction.

Submitting the empty transaction of the unhandled message is
a safe way to avoid the problem.

Change-Id: Ie191eec2b9517078f39c5f065243c87b04ddc189
Signed-off-by: Milos Fabian <milfabia@cisco.com>
pcep/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/AbstractTopologySessionListener.java

index 3d50fd03a097a2bfb91b595f3fcf10933ee7e6e8..ab89ddcdbc8318eb7c218e3176acc48da4c83367 100755 (executable)
@@ -274,6 +274,8 @@ public abstract class AbstractTopologySessionListener<S, L> implements PCEPSessi
 
         if (onMessage(ctx, message)) {
             LOG.info("Unhandled message {} on session {}", message, session);
+            //cancel not supported, submit empty transaction
+            ctx.trans.submit();
             return;
         }