fix(limiter/traffic): infinite Write loop on zero burst, missing httpLoader.Close, stale reload values, ignored WaitN error, silent UDP drops, SplitHostPort fallback

This commit is contained in:
ginuerzh
2026-05-24 20:20:01 +08:00
parent 9bbd7da526
commit e9372ea44a
4 changed files with 33 additions and 23 deletions
+3 -1
View File
@@ -24,7 +24,9 @@ func (l *llimiter) Wait(ctx context.Context, n int) int {
if l.limiter.Burst() < n {
n = l.limiter.Burst()
}
l.limiter.WaitN(ctx, n)
if err := l.limiter.WaitN(ctx, n); err != nil {
return 0
}
return n
}