mirror of
https://github.com/bitwarden/android.git
synced 2024-12-26 19:08:32 +03:00
PM-3350 Fixed CancellationTokenSource proper disposal
This commit is contained in:
parent
b43790de9a
commit
133a80acef
2 changed files with 3 additions and 7 deletions
|
@ -77,6 +77,7 @@ namespace Bit.App.Pages
|
|||
{
|
||||
_requestTimeCts?.Cancel();
|
||||
_requestTimeCts?.Dispose();
|
||||
_requestTimeCts = null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue