commit | 22705b69bec3f7fb87904ff7873ca158b3f3c3bd | [log] [tgz] |
---|---|---|
author | Robbie Gemmell <robbie@apache.org> | Wed May 01 16:29:13 2019 +0100 |
committer | Robbie Gemmell <robbie@apache.org> | Wed May 01 16:38:59 2019 +0100 |
tree | 97ca70e250985ca69901bd207f2ec1e50fcadf1a | |
parent | ad0a7debf47a4e7cdbcb97c3cf36d185c8863c18 [diff] |
PROTON-2029: tweaks #33 to apply the state but only prevent generating the frame, add clarifying doc comment. Retains existing order independence (between output processing) to avoid unlikely but possible breakage of existing uses.
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/engine/Delivery.java b/proton-j/src/main/java/org/apache/qpid/proton/engine/Delivery.java index b997309..5bdd364 100644 --- a/proton-j/src/main/java/org/apache/qpid/proton/engine/Delivery.java +++ b/proton-j/src/main/java/org/apache/qpid/proton/engine/Delivery.java
@@ -42,6 +42,8 @@ /** * updates the state of the delivery * + * The new state may have no on-the-wire effect, if delivery settlement was already communicated to/from the peer. + * * @param state the new delivery state */ public void disposition(DeliveryState state);
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/DeliveryImpl.java b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/DeliveryImpl.java index 7312bef..2928d37 100644 --- a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/DeliveryImpl.java +++ b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/DeliveryImpl.java
@@ -132,12 +132,8 @@ @Override public void disposition(final DeliveryState state) { - if (_settled) { - return; - } - _deliveryState = state; - if(!_remoteSettled) + if(!_remoteSettled && !_settled) { addToTransportWorkList(); }