add comment

This commit is contained in:
vis2k 2021-09-02 18:36:36 +08:00
parent 3e4def126f
commit bce20b5f46
2 changed files with 6 additions and 0 deletions

View File

@ -376,6 +376,9 @@ internal static void OnTransportData(ArraySegment<byte> data, int channelId)
// -> Reader would never be read past the end
// -> Batch would never be retired because end is never reached
//
// NOTE: prefixing every message in a batch with a length would
// avoid ever not reading to the end. for extra bandwidth.
//
// IMPORTANT: always keep this check to detect memory leaks.
// this took half a day to debug last time.
if (!isLoadingScene && unbatcher.BatchesCount > 0)

View File

@ -508,6 +508,9 @@ internal static void OnTransportData(int connectionId, ArraySegment<byte> data,
// -> Reader would never be read past the end
// -> Batch would never be retired because end is never reached
//
// NOTE: prefixing every message in a batch with a length would
// avoid ever not reading to the end. for extra bandwidth.
//
// IMPORTANT: always keep this check to detect memory leaks.
// this took half a day to debug last time.
if (!isLoadingScene && connection.unbatcher.BatchesCount > 0)