mirror of
https://github.com/bitwarden/mobile
synced 2025-12-17 16:53:26 +00:00
PM-3350 Fixed CancellationTokenSource proper disposal
This commit is contained in:
@@ -77,6 +77,7 @@ namespace Bit.App.Pages
|
|||||||
{
|
{
|
||||||
_requestTimeCts?.Cancel();
|
_requestTimeCts?.Cancel();
|
||||||
_requestTimeCts?.Dispose();
|
_requestTimeCts?.Dispose();
|
||||||
|
_requestTimeCts = null;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
using Bit.Core.Abstractions;
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Bit.Core.Abstractions;
|
|
||||||
using Microsoft.Maui.Controls;
|
|
||||||
using Microsoft.Maui;
|
|
||||||
|
|
||||||
namespace Bit.App.Utilities
|
namespace Bit.App.Utilities
|
||||||
{
|
{
|
||||||
@@ -37,7 +32,7 @@ namespace Bit.App.Utilities
|
|||||||
{
|
{
|
||||||
while (!_cancellationTokenSource.IsCancellationRequested)
|
while (!_cancellationTokenSource.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
await Device.InvokeOnMainThreadAsync(async () =>
|
await MainThread.InvokeOnMainThreadAsync(async () =>
|
||||||
{
|
{
|
||||||
if (!_cancellationTokenSource.IsCancellationRequested)
|
if (!_cancellationTokenSource.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user