accounting: fix wrong message on SIGUSR2 to enable/disable bwlimit

This was caused by the message code only looking at one of the
bandwidth filters, not all of them.

Fixes #8104
This commit is contained in:
Nick Craig-Wood 2024-09-26 17:52:43 +01:00
parent 6d04be99f2
commit b9927461c3

View File

@ -41,7 +41,12 @@ type tokenBucket struct {
//
// Call with lock held
func (bs *buckets) _isOff() bool { //nolint:unused // Don't include unused when running golangci-lint in case its on windows where this is not called
return bs[0] == nil
for i := range bs {
if bs[i] != nil {
return false
}
}
return true
}
// Disable the limits