Commit 012207b9 authored by Fernando Takagi's avatar Fernando Takagi
Browse files

Add search step safeguard.

parent 161a2211
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -471,8 +471,8 @@ func (m *LocalMatchmaker) processCustom() [][]*MatchmakerEntry {
			continue
		}

		// Reset if last step.
		if searchStep > maxSearchSteps {
		// Reset if last step or no more results.
		if searchStep > maxSearchSteps || len(blugeMatches.Hits) == 0 {
			searchStartIndex = 0
			searchStep = 1
		} else if len(blugeMatches.Hits) > 0 {