Skip to content

Commit

Permalink
fix(NetworkReader): fixing reset putting reader back into pool
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Frowen committed Nov 22, 2021
1 parent 4adc2a1 commit 52253b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Assets/Mirage/Runtime/Serialization/NetworkReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ public void Reset(byte[] array, int position, int length)
if (needsDisposing)
{
// dispose old handler first
Dispose();
// false here so we dont release reader back to pool
Dispose(false);
}

// reset disposed bool, as it can be disposed again after reset
Expand Down

0 comments on commit 52253b6

Please sign in to comment.