mirror of https://github.com/ppy/osu
Move nested task back outside try-catch to avoid double-error
This commit is contained in:
parent
678b18dde6
commit
882e1c69e5
|
@ -228,13 +228,6 @@ await Task.WhenAll(tasks.Select(async task =>
|
|||
|
||||
if (model == null)
|
||||
return null;
|
||||
|
||||
var scheduledImport = Task.Factory.StartNew(() => ImportModel(model, archive, batchImport, cancellationToken),
|
||||
cancellationToken,
|
||||
TaskCreationOptions.HideScheduler,
|
||||
batchImport ? import_scheduler_batch : import_scheduler);
|
||||
|
||||
return await scheduledImport.ConfigureAwait(false);
|
||||
}
|
||||
catch (TaskCanceledException)
|
||||
{
|
||||
|
@ -245,6 +238,13 @@ await Task.WhenAll(tasks.Select(async task =>
|
|||
LogForModel(model, @$"Model creation of {archive.Name} failed.", e);
|
||||
return null;
|
||||
}
|
||||
|
||||
var scheduledImport = Task.Factory.StartNew(() => ImportModel(model, archive, batchImport, cancellationToken),
|
||||
cancellationToken,
|
||||
TaskCreationOptions.HideScheduler,
|
||||
batchImport ? import_scheduler_batch : import_scheduler);
|
||||
|
||||
return await scheduledImport.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue