mirror of
https://github.com/osukey/osukey.git
synced 2025-05-05 05:37:18 +09:00
Fix incorrect cancellation logic
This commit is contained in:
parent
5d78561aa3
commit
747f912af5
@ -99,11 +99,13 @@ namespace osu.Game.Database
|
|||||||
|
|
||||||
PostNotification?.Invoke(notification);
|
PostNotification?.Invoke(notification);
|
||||||
|
|
||||||
|
using var linkedSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, notification.CancellationToken);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (var stream = exportStorage.CreateFileSafely(filename))
|
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
|
catch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user