Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/SignalR/common/Shared/PipeWriterStream.cs')
-rw-r--r--src/SignalR/common/Shared/PipeWriterStream.cs12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/SignalR/common/Shared/PipeWriterStream.cs b/src/SignalR/common/Shared/PipeWriterStream.cs
index 245731bfd9..eb5b6d5add 100644
--- a/src/SignalR/common/Shared/PipeWriterStream.cs
+++ b/src/SignalR/common/Shared/PipeWriterStream.cs
@@ -1,4 +1,4 @@
-// Copyright (c) .NET Foundation. All rights reserved.
+// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
@@ -76,15 +76,7 @@ namespace System.IO.Pipelines
_length += source.Length;
var task = _pipeWriter.WriteAsync(source);
- if (task.IsCompletedSuccessfully)
- {
- // Cancellation can be triggered by PipeWriter.CancelPendingFlush
- if (task.Result.IsCanceled)
- {
- throw new OperationCanceledException();
- }
- }
- else if (!task.IsCompletedSuccessfully)
+ if (!task.IsCompletedSuccessfully)
{
return WriteSlowAsync(task);
}