Skip to content

Commit 73674e7

Browse files
committed
Use cancallation token in download stream copying
1 parent 35ff4d6 commit 73674e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

csharp/extractor/Semmle.Util/FileUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ private static async Task DownloadFileAsync(string address, string filename, Htt
104104
{
105105
using var contentStream = await httpClient.GetStreamAsync(address, token);
106106
using var stream = new FileStream(filename, FileMode.Create, FileAccess.Write, FileShare.None, 4096, true);
107-
await contentStream.CopyToAsync(stream, CancellationToken.None);
107+
await contentStream.CopyToAsync(stream, token);
108108
}
109109

110110
private static void DownloadFileWithRetry(string address, string fileName, int tryCount, int timeoutMilliSeconds, ILogger logger)

0 commit comments

Comments
 (0)