Github user gemmellr commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2272#discussion_r213341266
  
    --- Diff: 
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
 ---
    @@ -581,8 +581,8 @@ public void offerProducerCredit(final SimpleString 
address,
              Runnable creditRunnable = () -> {
                 connection.lock();
                 try {
    -               if (receiver.getRemoteCredit() <= threshold) {
    -                  receiver.flow(credits);
    +               if (receiver.getCredit() <= threshold) {
    +                  receiver.flow(credits - receiver.getCredit());
    --- End diff --
    
    I think this should protect against trying to flow <=0 after the 
calculation.


---

Reply via email to