Skip to content

Commit

Permalink
replace err w/ nil
Browse files Browse the repository at this point in the history
  • Loading branch information
indexjoseph committed Jul 30, 2024
1 parent f50716f commit e56c992
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/fleetautoscalers/fleetautoscalers.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,12 +393,12 @@ func applyChainPolicy(c autoscalingv1.ChainPolicy, f *agonesv1.Fleet, gameServer
schedRep, schedLim, schedErr := applySchedulePolicy(entry.Schedule, f, gameServerLister, nodeCounts)
// If the schedule is active and no error was returned from the policy, then return the replicas, limited and error
if isScheduleActive(entry.Schedule) && schedErr == nil {
return schedRep, schedLim, schedErr
return schedRep, schedLim, nil
}
case autoscalingv1.WebhookPolicyType:
webhookRep, webhookLim, webhookErr := applyWebhookPolicy(entry.Webhook, f)
if webhookErr == nil {
return webhookRep, webhookLim, webhookErr
return webhookRep, webhookLim, nil
}
default:
return computeDesiredFleetSize(entry.FleetAutoscalerPolicy, f, gameServerLister, nodeCounts)
Expand Down

0 comments on commit e56c992

Please sign in to comment.