the most common reason of "Operation is not valid due to the current state of the object"
This commit is contained in:
Igor Popov
2013-03-27 06:08:01 -03:00
parent 9ca391c814
commit 0bf79635ec

View File

@@ -175,7 +175,11 @@ namespace OpenRA.Server
var p = preConns.SingleOrDefault( c => c.socket == s );
if (p != null) p.ReadData( this );
}
else if (conns.Count > 0) conns.Single( c => c.socket == s ).ReadData( this );
else if (conns.Count > 0)
{
var conn = conns.SingleOrDefault( c => c.socket == s );
if (conn != null) conn.ReadData( this );
}
foreach (var t in ServerTraits.WithInterface<ITick>())
t.Tick(this);