0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-22 03:05:16 +00:00

Handle max player count correctly

This commit is contained in:
Sanae 2022-02-22 14:33:59 -06:00
parent a554af2a44
commit 557a926a68

View file

@ -31,7 +31,7 @@ public class Server {
Logger.Warn($"Accepted connection for client {socket.RemoteEndPoint}");
try {
if (Clients.Count > Constants.MaxClients) {
if (Clients.Count == Constants.MaxClients) {
Logger.Warn("Turned away client due to max clients");
await socket.DisconnectAsync(false);
continue;