gemmellr commented on issue #33: PROTON-2029 Add fix and test for extraneous 
disposition after settle
URL: https://github.com/apache/qpid-proton-j/pull/33#issuecomment-488271342
 
 
   When I originally raised the JIRA I looked at a change while identifying the 
bug, and did something slightly different:
   ```
   +++ 
b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/DeliveryImpl.java
   @@ -133,7 +133,7 @@ public class DeliveryImpl implements Delivery
        public void disposition(final DeliveryState state)
        {
            _deliveryState = state;
   -        if(!_remoteSettled)
   +        if(!_remoteSettled && !_settled)
            {
                addToTransportWorkList();
            }
   ```
   The reason being, preventing the state being set as yours does means the 
calls become order-dependent, which they aren't currently, like many calls in 
the engine, i.e you could call settle then disposition and only at that point 
process the transport and get a disposition frame carrying the state and 
settled=true. In general I think being order-dependent is fine and more 
logical, but it wasn't before, and others aren't, so I wonder about changing it 
now.
   
   (It doesn't actually matter for the place this was originally noticed, as 
the two calls are are combined into one and the transport is processed 
afterwards call anyway. I've made a change there that will prevent the state 
being applied if settled, but I do wonder if the same change suits here at the 
lower engine level)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to