diff --git a/Ragon.Stress/Program.cs b/Ragon.Stress/Program.cs index 1eecdea..9cff92d 100644 --- a/Ragon.Stress/Program.cs +++ b/Ragon.Stress/Program.cs @@ -196,7 +196,7 @@ namespace Stress { var thread = new SimulationThread(); thread.Start("127.0.0.1", 4444, 50); - Thread.Sleep(1000); + Thread.Sleep(300); } Console.ReadKey(); diff --git a/Ragon/Sources/Authorization/AuthorizationManager.cs b/Ragon/Sources/Authorization/AuthorizationManager.cs index 03da1de..4fa5fde 100644 --- a/Ragon/Sources/Authorization/AuthorizationManager.cs +++ b/Ragon/Sources/Authorization/AuthorizationManager.cs @@ -33,7 +33,10 @@ public class AuthorizationManager : IAuthorizationManager { dispatcher.Dispatch(() => Accepted(peerId, playerId, playerName)); }, - (errorCode) => { dispatcher.Dispatch(() => Rejected(peerId, errorCode)); }); + (errorCode) => + { + dispatcher.Dispatch(() => Rejected(peerId, errorCode)); + }); } public void Accepted(uint peerId, string playerId, string playerName) diff --git a/Ragon/Sources/Game/GameThread.cs b/Ragon/Sources/Game/GameThread.cs index ea81589..7ea3d6a 100755 --- a/Ragon/Sources/Game/GameThread.cs +++ b/Ragon/Sources/Game/GameThread.cs @@ -85,8 +85,6 @@ namespace Ragon.Core _logger.Trace($"Rooms: {_roomManager.Rooms.Count} Clients: {_roomManager.RoomsBySocket.Count}"); _statisticsTimer.Restart(); } - - Thread.Sleep(15); } } diff --git a/Ragon/Sources/Server/ENet/ENetServer.cs b/Ragon/Sources/Server/ENet/ENetServer.cs index e0fcd32..4130947 100755 --- a/Ragon/Sources/Server/ENet/ENetServer.cs +++ b/Ragon/Sources/Server/ENet/ENetServer.cs @@ -76,7 +76,7 @@ namespace Ragon.Core { if (_host.CheckEvents(out _netEvent) <= 0) { - if (_host.Service(0, out _netEvent) <= 0) + if (_host.Service(15, out _netEvent) <= 0) break; polled = true;