mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Move nested task back outside try-catch to avoid double-error
This commit is contained in:
@ -228,13 +228,6 @@ namespace osu.Game.Database
|
|||||||
|
|
||||||
if (model == null)
|
if (model == null)
|
||||||
return 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)
|
catch (TaskCanceledException)
|
||||||
{
|
{
|
||||||
@ -245,6 +238,13 @@ namespace osu.Game.Database
|
|||||||
LogForModel(model, @$"Model creation of {archive.Name} failed.", e);
|
LogForModel(model, @$"Model creation of {archive.Name} failed.", e);
|
||||||
return 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Reference in New Issue
Block a user