Skip to content

Commit

Permalink
added condition for distributed logic (#3877)
Browse files Browse the repository at this point in the history
* added condition for distributed logic

* moved inside distributed

* added the inline suggestion

---------

Co-authored-by: igooch <[email protected]>
  • Loading branch information
ashutosji and igooch authored Jul 15, 2024
1 parent 74e8d74 commit a4576c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/gameserverallocations/find.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func findGameServerForAllocation(gsa *allocationv1.GameServerAllocation, list []
case apis.Distributed:
// randomised looping - make a list of indices, and then randomise them
// as we don't want to change the order of the gameserver slice
if !runtime.FeatureEnabled(runtime.FeatureCountsAndLists) {
if !runtime.FeatureEnabled(runtime.FeatureCountsAndLists) || len(gsa.Spec.Priorities) == 0 {
l := len(list)
indices := make([]int, l)
for i := 0; i < l; i++ {
Expand Down

0 comments on commit a4576c6

Please sign in to comment.