Skip to content

Commit

Permalink
Limit game server db retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
timiimit committed Feb 3, 2023
1 parent e3a2266 commit 227d18e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions UT4MasterServer.Services/Scoped/MatchmakingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ public async Task<List<GameServer>> ListAsync(GameServerFilterRequest inputFilte
}
}

// Limit number of results. if request retrieves more results,
// then caller should make filter more strict.
if (inputFilter.MaxResults > 100)
inputFilter.MaxResults = 100;

var options = new FindOptions<GameServer>()
{
Limit = inputFilter.MaxResults,
Expand Down

0 comments on commit 227d18e

Please sign in to comment.