Skip to content

Commit f911ff0

Browse files
committed
Update LoginViewModel.cs
1 parent 370184b commit f911ff0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/SecureFolderFS.Sdk/ViewModels/Controls/LoginViewModel.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,22 @@ private async Task TryUnlockAsync(CancellationToken cancellationToken = default)
7676
{
7777
try
7878
{
79-
var vaultLifecycle = await VaultService.VaultUnlocker.UnlockAsync(_vaultModel, _credentials, cancellationToken);
79+
var vaultLifecycle =
80+
await VaultService.VaultUnlocker.UnlockAsync(_vaultModel, _credentials, cancellationToken);
8081
VaultUnlocked?.Invoke(this, new(vaultLifecycle));
8182

8283

83-
8484
}
8585
catch (Exception ex)
8686
{
8787
// If failed, restart the process
8888
// TODO: Above ^
8989
_ = ex;
9090
}
91+
finally
92+
{
93+
_credentials.Dispose();
94+
}
9195
}
9296

9397
private async Task<bool> TryNextAuthAsync()

0 commit comments

Comments
 (0)