Handle max player count correctly
This commit is contained in:
parent
a554af2a44
commit
557a926a68
|
@ -31,7 +31,7 @@ public class Server {
|
||||||
Logger.Warn($"Accepted connection for client {socket.RemoteEndPoint}");
|
Logger.Warn($"Accepted connection for client {socket.RemoteEndPoint}");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (Clients.Count > Constants.MaxClients) {
|
if (Clients.Count == Constants.MaxClients) {
|
||||||
Logger.Warn("Turned away client due to max clients");
|
Logger.Warn("Turned away client due to max clients");
|
||||||
await socket.DisconnectAsync(false);
|
await socket.DisconnectAsync(false);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue