`Synchronizer` must be stopped after `HostedServices`.
MODIFY
WalletWasabi.Gui/Global.cs
WalletWasabi.Gui/Global.cs
@@ -696,12 +696,6 @@ namespace WalletWasabi.Gui
Logger.LogInfo($"{nameof(CoinJoinProcessor)} is disposed.");
}
- if (Synchronizer is { } synchronizer)
- {
- await synchronizer.StopAsync().ConfigureAwait(false);
- Logger.LogInfo($"{nameof(Synchronizer)} is stopped.");
- }
-
if (HostedServices is { } backgroundServices)
{
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(21));
@@ -710,6 +704,12 @@ namespace WalletWasabi.Gui
Logger.LogInfo("Stopped background services.");
}
+ if (Synchronizer is { } synchronizer)
+ {
+ await synchronizer.StopAsync().ConfigureAwait(false);
+ Logger.LogInfo($"{nameof(Synchronizer)} is stopped.");
+ }
+
if (AddressManagerFilePath is { } addressManagerFilePath)
{
IoHelpers.EnsureContainingDirectoryExists(addressManagerFilePath);

`Synchronizer` must be stopped after `HostedServices`.