EndOfStream first chance exceptions on server

The server class reads the memory stream in a forever loop until an
EndOfStreamException occurs. This causes repeated first chance
exceptions due to EndOfStreamException. This change verifies that the
memory stream's reader position is not past the length of the memory
stream.
This commit is contained in:
LunaticEdit
2015-04-13 00:44:37 -04:00
parent 70c9bca847
commit 575b568c6a

View File

@@ -425,7 +425,7 @@ namespace OpenRA.Server
try
{
for (;;)
while (ms.Position < ms.Length)
{
var so = ServerOrder.Deserialize(br);
if (so == null) return;