mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkConnection.InvokeHandler error messages are now shown if handler not found for msgType instead of failing silently
This commit is contained in:
parent
c01b48f582
commit
0e4f905a72
@ -120,14 +120,10 @@ public bool InvokeHandler(short msgType, NetworkReader reader, int channelId)
|
||||
m_MessageInfo.channelId = channelId;
|
||||
|
||||
NetworkMessageDelegate msgDelegate = m_MessageHandlersDict[msgType];
|
||||
if (msgDelegate == null)
|
||||
{
|
||||
if (LogFilter.logError) { Debug.LogError("NetworkConnection InvokeHandler no handler for " + msgType); }
|
||||
return false;
|
||||
}
|
||||
msgDelegate(m_MessageInfo);
|
||||
return true;
|
||||
}
|
||||
if (LogFilter.logError) { Debug.LogError("NetworkConnection InvokeHandler no handler for " + msgType); }
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -139,6 +135,7 @@ public bool InvokeHandler(NetworkMessage netMsg)
|
||||
msgDelegate(netMsg);
|
||||
return true;
|
||||
}
|
||||
if (LogFilter.logError) { Debug.LogError("NetworkConnection InvokeHandler no handler for " + netMsg.msgType); }
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user