Repository: activemq-artemis
Updated Branches:
  refs/heads/2.6.x 1282bebf3 -> f2198ae5d


ARTEMIS-1732 Fixing AMQPSenderTest

(cherry picked from commit e290071ceddd3ac66f23ab537e3e400ddd25bdf1)


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

Branch: refs/heads/2.6.x
Commit: f2198ae5d79d48a9783f8da4da8d7c28836fd2be
Parents: 1282beb
Author: Clebert Suconic <[email protected]>
Authored: Wed Aug 1 22:14:15 2018 -0400
Committer: Clebert Suconic <[email protected]>
Committed: Wed Aug 1 23:16:22 2018 -0400

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


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f2198ae5/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 86c0687..f940c5a 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
@@ -581,7 +581,9 @@ public class AMQPSessionCallback implements SessionCallback 
{
          Runnable creditRunnable = () -> {
             connection.lock();
             try {
-               receiver.flow(credits);
+               if (receiver.getRemoteCredit() <= threshold) {
+                  receiver.flow(credits);
+               }
             } finally {
                connection.unlock();
             }

Reply via email to