Skip to content

Commit c586827

Browse files
authored
Merge pull request #201 from Entroper/fix-stale-delivery-tag-stable
Fix stale delivery tags in RecoveryAwareModel
2 parents 4a45e6e + 0d357f0 commit c586827

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

projects/client/RabbitMQ.Client/src/client/impl/RecoveryAwareModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public override void BasicAck(ulong deliveryTag,
8686
bool multiple)
8787
{
8888
ulong realTag = deliveryTag - ActiveDeliveryTagOffset;
89-
if (realTag > 0)
89+
if (realTag > 0 && realTag <= deliveryTag)
9090
{
9191
base.BasicAck(realTag, multiple);
9292
}
@@ -97,7 +97,7 @@ public override void BasicNack(ulong deliveryTag,
9797
bool requeue)
9898
{
9999
ulong realTag = deliveryTag - ActiveDeliveryTagOffset;
100-
if (realTag > 0)
100+
if (realTag > 0 && realTag <= deliveryTag)
101101
{
102102
base.BasicNack(realTag, multiple, requeue);
103103
}
@@ -107,7 +107,7 @@ public override void BasicReject(ulong deliveryTag,
107107
bool requeue)
108108
{
109109
ulong realTag = deliveryTag - ActiveDeliveryTagOffset;
110-
if (realTag > 0)
110+
if (realTag > 0 && realTag <= deliveryTag)
111111
{
112112
base.BasicReject(realTag, requeue);
113113
}

0 commit comments

Comments
 (0)