Skip to content

Commit

Permalink
Update confusing comment (dotnet#38191)
Browse files Browse the repository at this point in the history
  • Loading branch information
MihaZupan authored Jun 20, 2020
1 parent 266a541 commit 8bf1bf0
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1072,12 +1072,11 @@ private async ValueTask SendDataAsync(ReadOnlyMemory<byte> buffer, CancellationT
{
Debug.Assert(_requestBodyCancellationSource != null);

// Deal with [ActiveIssue("https://github.com/dotnet/runtime/issues/17492")]
// Custom HttpContent classes do not get passed the cancellationToken.
// So, inject the expected CancellationToken here, to ensure we can cancel the request body send if needed.
// Cancel the request body sending if cancellation is requested on the supplied cancellation token.
CancellationTokenRegistration linkedRegistration = cancellationToken.CanBeCanceled && cancellationToken != _requestBodyCancellationSource.Token ?
RegisterRequestBodyCancellation(cancellationToken) :
default;

try
{
while (buffer.Length > 0)
Expand Down

0 comments on commit 8bf1bf0

Please sign in to comment.