PacketHandler fix

For some reason, killing the Client process on my VM while Remote Desktop was running on my host would cause the Server to crash.  A NullReferenceException was thrown @ Line 16 in PacketHandler.cs.  Not sure if this is the best fix, but the server is trying to handle a packet after client.Value is nulled
This commit is contained in:
d3agle 2015-07-25 03:53:00 -05:00
parent 92f0563cf0
commit 98bef4917a
1 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,9 @@ public static void HandlePacket(Client client, IPacket packet)
{
var type = packet.GetType();
if (client.Value == null)
return;
if (!client.Value.IsAuthenticated)
{
if (type == typeof(ClientPackets.GetAuthenticationResponse))