Skip to content

Commit 815d3cb

Browse files
author
Alexandru Scvortov
committed
take into account holes in confirms
1 parent 254115f commit 815d3cb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/src/com/rabbitmq/examples/ConfirmDontLoseMessages.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,9 @@ public void run() {
8181
public void handleAck(long seqNo,
8282
boolean multiple) {
8383
if (multiple) {
84-
for (long i = ackSet.first(); i <= seqNo; ++i)
85-
ackSet.remove(i);
84+
ackSet.headSet(seqNo+1).clear();
8685
} else {
87-
ackSet.remove(seqNo);
86+
ackSet.remove(seqNo);
8887
}
8988
}
9089
});

0 commit comments

Comments
 (0)