Skip to content

Commit

Permalink
Properly close key store on error during key link test
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxhy committed Mar 8, 2024
1 parent 2e797f6 commit 71bfba0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions KeyManager.Library.UI/Domain/LinkDialogViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,14 @@ public async Task RunLink()
try
{
await ks.Open();
await RunLinkImpl(ks);
await ks.Close();
try
{
await RunLinkImpl(ks);
}
finally
{
await ks.Close();
}

log.Info("Link execution completed.");
}
Expand Down

0 comments on commit 71bfba0

Please sign in to comment.