diff --git a/Unity-Technologies-networking/Runtime/NetworkConnection.cs b/Unity-Technologies-networking/Runtime/NetworkConnection.cs index 64ae26498..374f3e697 100644 --- a/Unity-Technologies-networking/Runtime/NetworkConnection.cs +++ b/Unity-Technologies-networking/Runtime/NetworkConnection.cs @@ -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; }