Move backend not connected detection to better place.
MODIFY
WalletWasabi/CoinJoin/Client/Clients/CoinJoinClient.cs
WalletWasabi/CoinJoin/Client/Clients/CoinJoinClient.cs
@@ -23,6 +23,7 @@ using WalletWasabi.CoinJoin.Common.Models;
using WalletWasabi.Crypto;
using WalletWasabi.Helpers;
using WalletWasabi.Logging;
+using WalletWasabi.Models;
using WalletWasabi.Services;
using static NBitcoin.Crypto.SchnorrBlinding;
@@ -861,6 +862,10 @@ namespace WalletWasabi.CoinJoin.Client.Clients
public async Task DequeueAllCoinsFromMixAsync(DequeueReason reason)
{
+ if (reason == DequeueReason.ApplicationExit && Synchronizer.BackendStatus == BackendStatus.NotConnected)
+ {
+ return;
+ }
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(3));
try
{

MODIFY
WalletWasabi/Wallets/WalletManager.cs
WalletWasabi/Wallets/WalletManager.cs
@@ -116,10 +116,6 @@ namespace WalletWasabi.Wallets
public async Task DequeueAllCoinsGracefullyAsync(DequeueReason reason, CancellationToken token)
{
- if (Synchronizer.BackendStatus == BackendStatus.NotConnected)
- {
- return;
- }
IEnumerable<Task> tasks = null;
lock (Lock)
{

Move backend not connected detection to better place.