未验证 提交 9d66056c 编写于 作者: T Tomáš Matoušek 提交者: GitHub

Ignore cancelled/faulted tasks in GlobalNotificationRemoteDeliveryService (#44105)

上级 b1913b80
......@@ -76,7 +76,7 @@ private void OnGlobalOperationStarted(object sender, EventArgs e)
lock (_globalNotificationsGate)
{
_globalNotificationsTask = _globalNotificationsTask.SafeContinueWithFromAsync(
SendStartNotificationAsync, _cancellationToken, TaskContinuationOptions.None, TaskScheduler.Default);
SendStartNotificationAsync, _cancellationToken, TaskContinuationOptions.OnlyOnRanToCompletion, TaskScheduler.Default);
}
}
......@@ -111,7 +111,7 @@ private void OnGlobalOperationStopped(object sender, GlobalOperationEventArgs e)
lock (_globalNotificationsGate)
{
_globalNotificationsTask = _globalNotificationsTask.SafeContinueWithFromAsync(
previous => SendStoppedNotificationAsync(previous, e), _cancellationToken, TaskContinuationOptions.None, TaskScheduler.Default);
previous => SendStoppedNotificationAsync(previous, e), _cancellationToken, TaskContinuationOptions.OnlyOnRanToCompletion, TaskScheduler.Default);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册