1
0

improve low traffic handling for initial blips

This commit is contained in:
Arpad Ryszka 2026-03-15 18:50:02 +01:00
parent ebe53d4109
commit 8cbcba8458

View File

@ -107,7 +107,7 @@ func (a *adaptive) Target(s Stats) (int, time.Duration) {
// magic number 2: we allow max 2 idle items to be collected only by the nightshift, to provide better
// support for sporadic requests, when it's active or just going inactive:
if t < 2 && a.activeStart.After(a.activeEnd) {
if t < 2 && (!a.initialized || a.activeStart.After(a.activeEnd)) {
t = 2
}