1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 15:53:44 +00:00

PM-3350 Fixed CancellationTokenSource proper disposal

This commit is contained in:
Federico Maccaroni
2024-01-22 12:30:29 -03:00
parent b43790de9a
commit 133a80acef
2 changed files with 3 additions and 7 deletions

View File

@@ -77,6 +77,7 @@ namespace Bit.App.Pages
{
_requestTimeCts?.Cancel();
_requestTimeCts?.Dispose();
_requestTimeCts = null;
}
catch (Exception ex)
{

View File

@@ -1,9 +1,4 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Bit.Core.Abstractions;
using Microsoft.Maui.Controls;
using Microsoft.Maui;
using Bit.Core.Abstractions;
namespace Bit.App.Utilities
{
@@ -37,7 +32,7 @@ namespace Bit.App.Utilities
{
while (!_cancellationTokenSource.IsCancellationRequested)
{
await Device.InvokeOnMainThreadAsync(async () =>
await MainThread.InvokeOnMainThreadAsync(async () =>
{
if (!_cancellationTokenSource.IsCancellationRequested)
{