Use the correct CPU period when throttling servers; closes pterodactyl/panel#4102

This commit is contained in:
DaneEveritt 2022-05-30 17:45:41 -04:00
parent 7fa7cc313f
commit 203a2091a0
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -118,7 +118,7 @@ func (l Limits) AsContainerResources() container.Resources {
// @see https://github.com/pterodactyl/panel/issues/3988 // @see https://github.com/pterodactyl/panel/issues/3988
if l.CpuLimit > 0 { if l.CpuLimit > 0 {
resources.CPUQuota = l.CpuLimit * 1_000 resources.CPUQuota = l.CpuLimit * 1_000
resources.CPUPeriod = 100_00 resources.CPUPeriod = 100_000
resources.CPUShares = 1024 resources.CPUShares = 1024
} }