activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-908: Ensure that connection lock is held when flushing
Date Wed, 15 Feb 2017 13:36:11 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 92290ba00 -> cdc974e71


ARTEMIS-908: Ensure that connection lock is held when flushing


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

Branch: refs/heads/master
Commit: 5f6a390b6098dca1cfda09af4c0af096dfe736c0
Parents: 92290ba
Author: Ulf Lilleengen <lulf@redhat.com>
Authored: Wed Feb 15 14:09:27 2017 +0100
Committer: Ulf Lilleengen <lulf@redhat.com>
Committed: Wed Feb 15 14:09:27 2017 +0100

----------------------------------------------------------------------
 .../artemis/protocol/amqp/broker/AMQPSessionCallback.java      | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5f6a390b/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 36e08d9..18c6b05 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
@@ -443,8 +443,10 @@ public class AMQPSessionCallback implements SessionCallback {
                                    final Receiver receiver) {
       try {
          if (address == null) {
-            receiver.flow(credits);
-            connection.flush();
+            synchronized (connection.getLock()) {
+               receiver.flow(credits);
+               connection.flush();
+            }
             return;
          }
          final PagingStore store = manager.getServer().getPagingManager().getPageStore(new
SimpleString(address));


Mime
View raw message