Skip to content

Commit 9990059

Browse files
author
David R. MacIver
committed
when reserving from the middle of an interval we need to resize the interval to end before the reserved ID
1 parent c2106f9 commit 9990059

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

projects/client/RabbitMQ.Client/src/util/IntAllocator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ public bool Reserve(int id)
242242
// The ID is in the middle of this interval.
243243
// We need to split the interval into two.
244244
IntervalList rest = new IntervalList(id + 1, current.End);
245+
current.End = id - 1;
245246
rest.Next = current.Next;
246247
current.Next = rest;
247248
}

0 commit comments

Comments
 (0)