Skip to content

Commit

Permalink
Cargo culting: Part 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillOsenkov committed Jan 12, 2021
1 parent 79fe7d3 commit 9b123c4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,8 @@ public async Task RunPacketReadLoopAsync()
/// <param name="packet">The packet to send.</param>
public void SendData(INodePacket packet)
{
var stream = new MemoryStream();
var writer = new BinaryWriter(stream);
var stream = this._writeBufferMemoryStream;
var writer = this._writeBufferStreamWriter;

// clear the buffer but keep the underlying capacity to avoid reallocations
stream.SetLength(0);
Expand Down

0 comments on commit 9b123c4

Please sign in to comment.