update comments

This commit is contained in:
vis2k 2021-09-02 19:01:18 +08:00
parent 86eeecc9cf
commit 99e0a6f401
2 changed files with 2 additions and 2 deletions

View File

@ -308,7 +308,7 @@ static bool UnpackAndInvoke(NetworkReader reader, int channelId)
// message in a batch are NOT length prefixed to save bandwidth.
// every message needs to be handled and read until the end.
// otherwise it would overlap into the next message.
// => need to error and disconnect to avoid undefined behaviour.
// => need to warn and disconnect to avoid undefined behaviour.
// => WARNING, not error. can happen if attacker sends random data.
Debug.LogWarning($"Closed connection. Unknown message id: {msgType}. This can happen if no handler was registered for this message.");
connection.Disconnect();

View File

@ -441,7 +441,7 @@ static bool UnpackAndInvoke(NetworkConnectionToClient connection, NetworkReader
// message in a batch are NOT length prefixed to save bandwidth.
// every message needs to be handled and read until the end.
// otherwise it would overlap into the next message.
// => need to error and disconnect to avoid undefined behaviour.
// => need to warn and disconnect to avoid undefined behaviour.
// => WARNING, not error. can happen if attacker sends random data.
Debug.LogWarning($"Closed connection: {connection}. Unknown message id: {msgType}. This can happen if no handler was registered for this message.");
connection.Disconnect();