bring scope of cts out
MODIFY
WalletWasabi.Gui/Global.cs
WalletWasabi.Gui/Global.cs
@@ -384,6 +384,8 @@ namespace WalletWasabi.Gui
private static CancellationTokenSource CancelWalletServiceInitialization = null;
public static async Task InitializeWalletServiceAsync(KeyManager keyManager)
+ {
+ using (CancelWalletServiceInitialization = new CancellationTokenSource())
{
while (!Initialized)
{
@@ -403,8 +405,6 @@ namespace WalletWasabi.Gui
ChaumianClient.Start();
Logger.LogInfo("Start Chaumian CoinJoin service...");
- using (CancelWalletServiceInitialization = new CancellationTokenSource())
- {
Logger.LogInfo("Starting WalletService...");
await WalletService.InitializeAsync(CancelWalletServiceInitialization.Token);
Logger.LogInfo("WalletService started.");

bring scope of cts out