qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject qpid-jms-amqp-0-x git commit: QPID-8057: [JMS AMQP 0-x][AMQP 0-10] Fix race on handling of execution exception
Date Wed, 06 Dec 2017 13:46:12 GMT
Repository: qpid-jms-amqp-0-x
Updated Branches:
  refs/heads/master ce644a322 -> 7fe48d96b


QPID-8057: [JMS AMQP 0-x][AMQP 0-10] Fix race on handling of execution exception


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms-amqp-0-x/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms-amqp-0-x/commit/7fe48d96
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms-amqp-0-x/tree/7fe48d96
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms-amqp-0-x/diff/7fe48d96

Branch: refs/heads/master
Commit: 7fe48d96b4aa5e13b1b33abd6db573904f8aab00
Parents: ce644a3
Author: Alex Rudyy <orudyy@apache.org>
Authored: Wed Dec 6 13:45:39 2017 +0000
Committer: Alex Rudyy <orudyy@apache.org>
Committed: Wed Dec 6 13:45:39 2017 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/qpid/client/AMQSession_0_10.java   | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms-amqp-0-x/blob/7fe48d96/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java b/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
index 486178f..695a695 100644
--- a/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
+++ b/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
@@ -1050,6 +1050,7 @@ public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10,
Basic
 
     public void setCurrentException(SessionException se)
     {
+        QpidException amqe;
         synchronized (_currentExceptionLock)
         {
             ExecutionException ee = se.getException();
@@ -1058,7 +1059,7 @@ public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10,
Basic
             {
                 code = ee.getErrorCode().getValue();
             }
-            QpidException amqe = new AMQException(code, _isHardError, se.getMessage(), se.getCause());
+            amqe = new AMQException(code, _isHardError, se.getMessage(), se.getCause());
             _currentException = amqe;
         }
         if (!_isHardError)
@@ -1067,17 +1068,17 @@ public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10,
Basic
             stopDispatcherThread();
             try
             {
-                closed(_currentException);
+                closed(amqe);
             }
             catch(Exception e)
             {
                 _logger.warn("Error closing session", e);
             }
-            getAMQConnection().exceptionReceived(_currentException);
+            getAMQConnection().exceptionReceived(amqe);
         }
         else
         {
-            getAMQConnection().closed(_currentException);
+            getAMQConnection().closed(amqe);
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message