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

    https://github.com/apache/activemq-artemis/pull/482#discussion_r60918748
  
    --- Diff: 
artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/util/DeliveryUtil.java
 ---
    @@ -30,6 +30,9 @@ public static int readDelivery(Receiver receiver, ByteBuf 
buffer) {
           while ((count = receiver.recv(buffer.array(), buffer.arrayOffset() + 
buffer.writerIndex(), buffer.writableBytes())) > 0) {
              // Increment the writer index by the number of bytes written into 
it while calling recv.
              buffer.writerIndex(buffer.writerIndex() + count);
    +         if (buffer.writableBytes() <= 0) {
    +            buffer.ensureWritable(count);
    --- End diff --
    
    You are right Clebert, we don't need it. The netty api says if there are 
enough writeable bytes this call won't do anything. I'll remove the 'if' 
checking. Thanks


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to