Prevent sending RESUME if process is already resumed

This commit is contained in:
Ingo Oppermann
2024-07-23 16:07:48 +02:00
parent 54b1fe8e86
commit 28e1325eb2

View File

@@ -456,10 +456,12 @@ func (l *limiter) limitCPU(ctx context.Context, limit float64, interval time.Dur
if factorTopLimit > 0 {
factorTopLimit -= 10
} else {
if l.cpuThrottling {
if l.proc != nil {
l.proc.Resume()
}
l.cpuThrottling = false
}
l.lock.Unlock()
time.Sleep(100 * time.Millisecond)
continue