diff --git a/src/Downloader/ConcurrentStream.cs b/src/Downloader/ConcurrentStream.cs index e51fa3b..b40b87e 100644 --- a/src/Downloader/ConcurrentStream.cs +++ b/src/Downloader/ConcurrentStream.cs @@ -120,6 +120,9 @@ public async Task WriteAsync(long position, byte[] bytes, int length) if (bytes.Length < length) throw new ArgumentOutOfRangeException(nameof(length)); + if(IsFaulted && Exception is not null) + throw Exception; + await _inputBuffer.TryAdd(new Packet(position, bytes, length)); }