We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d989b49 commit 1ce4868Copy full SHA for 1ce4868
1 file changed
src/dotnetCampus.FileDownloader/DownloadByHttpClient/SegmentFileDownloaderByHttpClient.cs
@@ -573,7 +573,12 @@ private async ValueTask DownloadTask()
573
return;
574
}
575
576
- data = await DownloadDataList.Reader.ReadAsync().ConfigureAwait(false);
+ if (!DownloadDataList.Reader.TryRead(out data))
577
+ {
578
+ // 居然读取不到数据,那就再次进入循环吧
579
+ continue;
580
+ }
581
+
582
Interlocked.Decrement(ref _workTaskCount);
583
584
catch (ChannelClosedException)
0 commit comments