Trouble with Socket.AddMatchmakerAsync in Nakama

Socket.AddMatchmakerAsync(“*” , 2, 4);

When using the Socket.AddMatchmakerAsync function with a minCount of 2 and a maxCount of 4, I’ve noticed that it behaves unexpectedly. Specifically, when three players request matchmaking, it only creates a match for two players. However, it works as expected when four players request matchmaking.

I’m curious to understand why this function seems to prioritize the minCount and maxCount exclusively, rather than accommodating an intermediate number of players between the specified range. If anyone has insights or suggestions on how to address this behavior, I would greatly appreciate the assistance. Thank you!

@muhammad.hunain please make sure you’re using the latest version of the server and have a look at the matchmaker config options, they might shed some light on what’s happening.

@sesposito i have updated my server version, now it’s 3.20.1.

It is behaving unexpectedly. when two players hit Socket.AddMatchmakerAsync(“*” , 2, 2) this function from client side. it’s callback OnReceivedMatchmakerMatched worked for both but it give IMatchmakerMatched.matchId empty.

In Result it fails to join match, NakamaConnection.Socket.JoinMatchAsync(IMatchmakerMatched.MatchId).

Error: WebSocketException: Matchmaker ticket not found

Are you using authoritative or relayed matched? Have you registered a MatchmakerMatched function in one of the runtimes? If yes, could you share the code please?