handle exhausted retry backoffs

Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
This commit is contained in:
Dmitri Dolguikh
2026-07-01 17:01:19 +02:00
parent bb130df1f7
commit 0ab6070962

View File

@@ -279,8 +279,12 @@ func (m *Manager) startRetries(ctx context.Context, flowConfigInterval time.Dura
continue
}
if err := m.send(e); err != nil {
timer = time.NewTimer(retryBackoff.NextBackOff())
resetBackoff = false
if nextBackoff := retryBackoff.NextBackOff(); nextBackoff != backoff.Stop {
timer = time.NewTimer(nextBackoff)
resetBackoff = false
} else {
resetBackoff = true // we exhausted retries, reset retry loop
}
break
}
}