refactor: remove pointless if

This commit is contained in:
Paul Pacheco 2019-04-06 06:51:37 -05:00
parent b202473bcf
commit e8679a0562

View File

@ -242,8 +242,8 @@ public virtual void TransportReceive(byte[] buffer)
{
// unpack message
NetworkReader reader = new NetworkReader(buffer);
if (MessagePacker.UnpackMessage(reader, out int msgType))
{
MessagePacker.UnpackMessage(reader, out int msgType);
if (logNetworkMessages)
{
Debug.Log("ConnectionRecv con:" + connectionId + " msgType:" + msgType + " content:" + BitConverter.ToString(buffer));
@ -255,8 +255,6 @@ public virtual void TransportReceive(byte[] buffer)
lastMessageTime = Time.time;
}
}
else Debug.LogError("HandleBytes UnpackMessage failed for: " + BitConverter.ToString(buffer));
}
catch (Exception exception)
{
Disconnect();