From 567b1967cf9293203e8909615dd8693cc1cb552e Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 13 Jul 2013 21:03:44 +1200 Subject: [PATCH] Revert "restrict packet size to 4K in server" This reverts commit edb08d6feca72dec719ea7d292b08676539a9b9a. --- OpenRA.Game/Server/Connection.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/OpenRA.Game/Server/Connection.cs b/OpenRA.Game/Server/Connection.cs index e82077d501..76799ee660 100644 --- a/OpenRA.Game/Server/Connection.cs +++ b/OpenRA.Game/Server/Connection.cs @@ -25,7 +25,6 @@ namespace OpenRA.Server public int ExpectLength = 8; public int Frame = 0; public int MostRecentFrame = 0; - public const int MaxOrderLength = 4096; /* client data */ public int PlayerIndex; @@ -66,7 +65,7 @@ namespace OpenRA.Server if (e.SocketErrorCode == SocketError.WouldBlock) break; server.DropClient(this); - Log.Write("server", "Dropping client {0} because reading the data failed: {1}", PlayerIndex, e); + Log.Write("server", "Dropping client {0} because reading the data failed: {1}", this.PlayerIndex.ToString(), e); return false; } } @@ -87,13 +86,6 @@ namespace OpenRA.Server ExpectLength = BitConverter.ToInt32(bytes, 0) - 4; Frame = BitConverter.ToInt32(bytes, 4); State = ReceiveState.Data; - - if (ExpectLength < 0 || ExpectLength > MaxOrderLength) - { - server.DropClient(this); - Log.Write("server", "Dropping client {0} for excessive order length = {1}", PlayerIndex, ExpectLength); - return; - } } break; case ReceiveState.Data: