diff options
| author | 2023-07-24 10:13:31 +0000 | |
|---|---|---|
| committer | 2023-07-24 10:13:31 +0000 | |
| commit | b7891bb46249b147c824e5a44577f1ebb9efa7be (patch) | |
| tree | b399158373606592ecc0b7f6dbf8875e1be20e51 /vendor/go.uber.org/automaxprocs/internal/cgroups/cgroups.go | |
| parent | [chore] Disable the right webfinger test (#2018) (diff) | |
| download | gotosocial-b7891bb46249b147c824e5a44577f1ebb9efa7be.tar.xz | |
[chore]: Bump go.uber.org/automaxprocs from 1.5.2 to 1.5.3 (#2020)
Diffstat (limited to 'vendor/go.uber.org/automaxprocs/internal/cgroups/cgroups.go')
| -rw-r--r-- | vendor/go.uber.org/automaxprocs/internal/cgroups/cgroups.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/go.uber.org/automaxprocs/internal/cgroups/cgroups.go b/vendor/go.uber.org/automaxprocs/internal/cgroups/cgroups.go index e6c173197..e89f54360 100644 --- a/vendor/go.uber.org/automaxprocs/internal/cgroups/cgroups.go +++ b/vendor/go.uber.org/automaxprocs/internal/cgroups/cgroups.go @@ -110,8 +110,8 @@ func (cg CGroups) CPUQuota() (float64, bool, error) { } cfsPeriodUs, err := cpuCGroup.readInt(_cgroupCPUCFSPeriodUsParam) - if err != nil { - return -1, false, err + if defined := cfsPeriodUs > 0; err != nil || !defined { + return -1, defined, err } return float64(cfsQuotaUs) / float64(cfsPeriodUs), true, nil |
