You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2016/10/24 13:42:46 UTC

[5/5] activemq-artemis git commit: ARTEMIS-814: Fix a bug where context could be null in case a connection was closed before the flow arrived

ARTEMIS-814: Fix a bug where context could be null in case a connection was closed before the flow arrived


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/6e5b917c
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/6e5b917c
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/6e5b917c

Branch: refs/heads/master
Commit: 6e5b917cc5c83ba9771e8f884b07eb271affbeff
Parents: b2a5fe1
Author: Ulf Lilleengen <lu...@redhat.com>
Authored: Fri Oct 21 15:22:46 2016 +0200
Committer: Clebert Suconic <cl...@apache.org>
Committed: Mon Oct 24 09:42:22 2016 -0400

----------------------------------------------------------------------
 .../artemis/protocol/amqp/proton/AMQPConnectionContext.java      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6e5b917c/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPConnectionContext.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPConnectionContext.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPConnectionContext.java
index 1f193eb..65ed836 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPConnectionContext.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPConnectionContext.java
@@ -372,7 +372,9 @@ public class AMQPConnectionContext extends ProtonInitializable {
 
       @Override
       public void onFlow(Link link) throws Exception {
-         ((ProtonDeliveryHandler) link.getContext()).onFlow(link.getCredit(), link.getDrain());
+         if (link.getContext() != null) {
+            ((ProtonDeliveryHandler) link.getContext()).onFlow(link.getCredit(), link.getDrain());
+         }
       }
 
       @Override