You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ja...@apache.org on 2012/01/04 17:45:10 UTC

svn commit: r1227219 - /servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/AsyncBridge.java

Author: janstey
Date: Wed Jan  4 16:45:09 2012
New Revision: 1227219

URL: http://svn.apache.org/viewvc?rev=1227219&view=rev
Log:
SM-2141 - Fix leak in servicemix-eip when handling late responses

Modified:
    servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/AsyncBridge.java

Modified: servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/AsyncBridge.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/AsyncBridge.java?rev=1227219&r1=1227218&r2=1227219&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/AsyncBridge.java (original)
+++ servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/AsyncBridge.java Wed Jan  4 16:45:09 2012
@@ -267,11 +267,13 @@ public class AsyncBridge extends EIPEndp
                     throw new IllegalArgumentException("Could not retrieve correlation id for incoming exchange");
                 }
                 t0 = (MessageExchange) store.load(correlationId + ".t0");
-                store.store(correlationId + ".t2", t2);
                 // The request is found and has not timed out
                 if (t0 != null) {
+                    store.store(correlationId + ".t2", t2);
                     MessageUtil.transferInToOut(t2, t0);
                     send(t0);
+                } else {
+                    done(t2);
                 }
             } else {
                 throw new IllegalStateException();