You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2017/01/04 16:59:50 UTC

[1/2] activemq-artemis git commit: This closes #947

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 4dc975187 -> 973265b1e


This closes #947


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

Branch: refs/heads/master
Commit: 973265b1efcf92440049424daafd0db56ede587f
Parents: 4dc9751 f2f3552
Author: Justin Bertram <jb...@apache.org>
Authored: Wed Jan 4 10:59:33 2017 -0600
Committer: Justin Bertram <jb...@apache.org>
Committed: Wed Jan 4 10:59:33 2017 -0600

----------------------------------------------------------------------
 .../artemis/protocol/amqp/broker/AMQPSessionCallback.java    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------



[2/2] activemq-artemis git commit: ARTEMIS-908: Hold connection lock when issuing credits

Posted by jb...@apache.org.
ARTEMIS-908: Hold connection lock when issuing credits


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

Branch: refs/heads/master
Commit: f2f355206740b6efb2359ad7296409fbfd62c5b3
Parents: 4dc9751
Author: Ulf Lilleengen <lu...@redhat.com>
Authored: Tue Jan 3 11:03:38 2017 +0100
Committer: Justin Bertram <jb...@apache.org>
Committed: Wed Jan 4 10:59:33 2017 -0600

----------------------------------------------------------------------
 .../artemis/protocol/amqp/broker/AMQPSessionCallback.java    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f2f35520/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
index d8c908c..3dce5dc 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
@@ -433,9 +433,11 @@ public class AMQPSessionCallback implements SessionCallback {
          store.checkMemory(new Runnable() {
             @Override
             public void run() {
-               if (receiver.getRemoteCredit() < threshold) {
-                  receiver.flow(credits);
-                  connection.flush();
+               synchronized (connection.getLock()) {
+                  if (receiver.getRemoteCredit() < threshold) {
+                     receiver.flow(credits);
+                     connection.flush();
+                  }
                }
             }
          });