Skip to content

Commit

Permalink
Update MessageReader.cs
Browse files Browse the repository at this point in the history
fix memory leaking dotnet/runtime#78180
  • Loading branch information
NeverMorewd authored Nov 17, 2023
1 parent 3e3cd4e commit 18e42e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GrpcDotNetNamedPipes/Internal/MessageReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public async Task<bool> MoveNext(CancellationToken cancellationToken)
{
try
{
var combined =
using var combined =
CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, _callCancellationToken,
_deadline.Token);
return await _payloadQueue.MoveNext(combined.Token).ConfigureAwait(false);
Expand Down Expand Up @@ -73,4 +73,4 @@ public Task<TMessage> ReadNextMessage(CancellationToken cancellationToken)
return Current;
});
}
}
}

0 comments on commit 18e42e0

Please sign in to comment.