We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 305b19a commit 86263bcCopy full SHA for 86263bc
1 file changed
src/SuperSocket.Channel/PipeChannel.cs
@@ -84,7 +84,7 @@ public async override IAsyncEnumerable<TPackageInfo> RunAsync()
84
if (_readsTask == null || _sendsTask == null)
85
throw new Exception("The channel has not been started yet.");
86
87
- while (true)
+ while (!_cts.IsCancellationRequested)
88
{
89
var package = await _packagePipe.ReadAsync().ConfigureAwait(false);
90
@@ -95,6 +95,8 @@ public async override IAsyncEnumerable<TPackageInfo> RunAsync()
95
96
yield return package;
97
}
98
+
99
+ //How do empty a pipe?
100
101
102
private async ValueTask HandleClosing()
0 commit comments