diff --git a/pkg/mcs/resource_manager/server/token_bukets.go b/pkg/mcs/resource_manager/server/token_bukets.go index 6c1d1e84d08..61362cdf41f 100644 --- a/pkg/mcs/resource_manager/server/token_bukets.go +++ b/pkg/mcs/resource_manager/server/token_bukets.go @@ -111,10 +111,10 @@ func (t *GroupTokenBucket) request(now time.Time, neededTokens float64, targetPe t.Tokens += float64(t.Settings.FillRate) * delta.Seconds() t.LastUpdate = &now } - if t.Settings.BurstLimit != 0 { - if burst := float64(t.Settings.BurstLimit); t.Tokens > burst { - t.Tokens = burst - } + } + if t.Settings.BurstLimit != 0 { + if burst := float64(t.Settings.BurstLimit); t.Tokens > burst { + t.Tokens = burst } }