From 2c120af61e31ead165175556a9564722d4d0149b Mon Sep 17 00:00:00 2001 From: guybe7 Date: Tue, 30 Mar 2021 22:48:01 +0200 Subject: [PATCH] XAUTOCLAIM: JUSTID should prevent incrementing delivery_count (#8724) To align with XCLAIM and the XAUTOCLAIM docs --- src/t_stream.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/t_stream.c b/src/t_stream.c index 2abce2b6a..1407ee98b 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -3121,7 +3121,9 @@ void xautoclaimCommand(client *c) { /* Update the consumer and idle time. */ nack->delivery_time = now; - nack->delivery_count++; + /* Increment the delivery attempts counter unless JUSTID option provided */ + if (!justid) + nack->delivery_count++; if (nack->consumer != consumer) { /* Add the entry in the new consumer local PEL. */