Add .ConfigureAwait(false) in StreamPipeSink Writer function

This commit is contained in:
Malte Rosenbjerg 2021-11-01 18:53:33 +01:00
parent b217ca4af0
commit e0385dcfdb

View file

@ -17,7 +17,7 @@ public StreamPipeSink(Func<Stream, CancellationToken, Task> writer)
}
public StreamPipeSink(Stream destination)
{
Writer = (inputStream, cancellationToken) => inputStream.CopyToAsync(destination, BlockSize, cancellationToken);
Writer = async (inputStream, cancellationToken) => await inputStream.CopyToAsync(destination, BlockSize, cancellationToken).ConfigureAwait(false);
}
public Task ReadAsync(Stream inputStream, CancellationToken cancellationToken)