3
0

Fix resource counter not respecting unlimited size option

This commit is contained in:
Tomaž Jerman 2024-11-28 16:36:29 +01:00
parent bc0e5a30ad
commit 7fb75c92cb

View File

@ -130,7 +130,7 @@ func (svc *usageCounter[K]) bestPerformers(n int) (out []K) {
for i := len(hh) - 1; i >= 0; i-- {
out = append(out, hh[i].key)
if len(out) >= n {
if n > 0 && len(out) >= n {
return
}
}