mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
checking if incoming message has length 0 before checking its id (#2336)
This commit is contained in:
parent
e368284f8e
commit
25be44840e
@ -265,6 +265,12 @@ public bool InvokeHandler<T>(T msg, int channelId) where T : NetworkMessage
|
||||
/// <param name="buffer">The data received.</param>
|
||||
internal void TransportReceive(ArraySegment<byte> buffer, int channelId)
|
||||
{
|
||||
if (buffer.Count == 0)
|
||||
{
|
||||
logger.LogError($"ConnectionRecv {this} Message was empty");
|
||||
return;
|
||||
}
|
||||
|
||||
// unpack message
|
||||
using (PooledNetworkReader networkReader = NetworkReaderPool.GetReader(buffer))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user