Skip to content

Commit 4238c8e

Browse files
committed
Make sure tasks controlled by the Downloader can be cancelled
1 parent 5cb6907 commit 4238c8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/com.unity.editor.tasks/Editor/Tasks/DownloadTask.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ public static bool Download(ILogging logger,
289289

290290
public void QueueDownload(UriString url, string targetDirectory, string filename = null, int retryCount = 0)
291291
{
292-
var download = new DownloadTask(TaskManager, url, targetDirectory, filename, retryCount);
292+
var download = new DownloadTask(TaskManager, url, targetDirectory, filename, retryCount, Token);
293293
download.OnStart += t => OnDownloadStart?.Invoke(((DownloadTask)t).Url);
294294
download.OnEnd += (t, res, s, ex) => {
295295
if (s)

0 commit comments

Comments
 (0)