Skip to content

Commit c846e70

Browse files
committed
Use TaskExtensions
1 parent 24f8b32 commit c846e70

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

StandardSocketsHttpHandler/Net/Http/SocketsHttpHandler/ConnectionCloseReadStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public override Task CopyToAsync(Stream destination, int bufferSize, Cancellatio
8484
}
8585

8686
Task copyTask = _connection.CopyToUntilEofAsync(destination, bufferSize, cancellationToken);
87-
if (copyTask.IsCompletedSuccessfully)
87+
if (copyTask.IsCompletedSuccessfully())
8888
{
8989
Finish();
9090
return Task.CompletedTask;

StandardSocketsHttpHandler/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public override Task CopyToAsync(Stream destination, int bufferSize, Cancellatio
9999
}
100100

101101
Task copyTask = _connection.CopyToExactLengthAsync(destination, _contentBytesRemaining, cancellationToken);
102-
if (copyTask.IsCompletedSuccessfully)
102+
if (copyTask.IsCompletedSuccessfully())
103103
{
104104
Finish();
105105
return Task.CompletedTask;

StandardSocketsHttpHandler/Net/Http/SocketsHttpHandler/RawConnectionStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public override Task CopyToAsync(Stream destination, int bufferSize, Cancellatio
7979
}
8080

8181
Task copyTask = _connection.CopyToUntilEofAsync(destination, bufferSize, cancellationToken);
82-
if (copyTask.IsCompletedSuccessfully)
82+
if (copyTask.IsCompletedSuccessfully())
8383
{
8484
Finish();
8585
return Task.CompletedTask;

0 commit comments

Comments
 (0)