summaryrefslogtreecommitdiff
path: root/vendor/go.uber.org/automaxprocs/internal/cgroups/cgroups2.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2023-07-24 10:13:31 +0000
committerLibravatar GitHub <noreply@github.com>2023-07-24 10:13:31 +0000
commitb7891bb46249b147c824e5a44577f1ebb9efa7be (patch)
treeb399158373606592ecc0b7f6dbf8875e1be20e51 /vendor/go.uber.org/automaxprocs/internal/cgroups/cgroups2.go
parent[chore] Disable the right webfinger test (#2018) (diff)
downloadgotosocial-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/cgroups2.go')
-rw-r--r--vendor/go.uber.org/automaxprocs/internal/cgroups/cgroups2.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/vendor/go.uber.org/automaxprocs/internal/cgroups/cgroups2.go b/vendor/go.uber.org/automaxprocs/internal/cgroups/cgroups2.go
index 3ac10c8b6..78556062f 100644
--- a/vendor/go.uber.org/automaxprocs/internal/cgroups/cgroups2.go
+++ b/vendor/go.uber.org/automaxprocs/internal/cgroups/cgroups2.go
@@ -159,6 +159,10 @@ func (cg *CGroups2) CPUQuota() (float64, bool, error) {
if err != nil {
return -1, false, err
}
+
+ if period == 0 {
+ return -1, false, errors.New("zero value for period is not allowed")
+ }
}
return float64(max) / float64(period), true, nil