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:
parent
6d04be99f2
commit
b9927461c3
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue