Fix Session.Deserialize error handling.

This commit is contained in:
Paul Chote
2020-08-14 14:09:12 +01:00
committed by reaperrr
parent c4b4a8c8a5
commit 3efac3287e

View File

@@ -846,17 +846,16 @@ namespace OpenRA.Mods.Common.Server
return true; return true;
} }
var lobbyInfo = Session.Deserialize(s); try
if (lobbyInfo == null) {
server.LobbyInfo = Session.Deserialize(s);
server.SyncLobbyInfo();
}
catch (Exception)
{ {
server.SendOrderTo(conn, "Message", "Invalid Lobby Info Sent"); server.SendOrderTo(conn, "Message", "Invalid Lobby Info Sent");
return true;
} }
server.LobbyInfo = lobbyInfo;
server.SyncLobbyInfo();
return true; return true;
} }