Fix incorrect cancellation logic

This commit is contained in:
Dean Herbert 2023-05-05 21:08:01 +09:00
parent 5d78561aa3
commit 747f912af5

View File

@ -99,11 +99,13 @@ namespace osu.Game.Database
PostNotification?.Invoke(notification);
using var linkedSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, notification.CancellationToken);
try
{
using (var stream = exportStorage.CreateFileSafely(filename))
{
await ExportToStreamAsync(model, stream, notification, cancellationToken == CancellationToken.None ? notification.CancellationToken : cancellationToken).ConfigureAwait(false);
await ExportToStreamAsync(model, stream, notification, linkedSource.Token).ConfigureAwait(false);
}
}
catch