diff --git a/Assets/Mirror/Runtime/NetworkConnection.cs b/Assets/Mirror/Runtime/NetworkConnection.cs index 5fc4e3ae5..1df4c89b9 100644 --- a/Assets/Mirror/Runtime/NetworkConnection.cs +++ b/Assets/Mirror/Runtime/NetworkConnection.cs @@ -265,6 +265,12 @@ public bool InvokeHandler(T msg, int channelId) where T : NetworkMessage /// The data received. internal void TransportReceive(ArraySegment buffer, int channelId) { + if (buffer.Count == 0) + { + logger.LogError($"ConnectionRecv {this} Message was empty"); + return; + } + // unpack message using (PooledNetworkReader networkReader = NetworkReaderPool.GetReader(buffer)) {