Dispose correctly.
MODIFY
WalletWasabi/Services/WasabiSynchronizer.cs
WalletWasabi/Services/WasabiSynchronizer.cs
@@ -43,6 +43,7 @@ namespace WalletWasabi.Services
private long _blockRequests; // There are priority requests in queue.
+ /// <param name="wasabiClientFactory">The class takes ownership of the instance.</param>
public WasabiSynchronizer(Network network, BitcoinStore bitcoinStore, WasabiClientFactory wasabiClientFactory)
{
Network = network;
@@ -65,6 +66,7 @@ namespace WalletWasabi.Services
public SynchronizeResponse? LastResponse { get; private set; }
+ /// <summary><see cref="WasabiSynchronizer"/> is responsible for disposing of this object.</summary>
public WasabiClientFactory WasabiClientFactory { get; }
public WasabiClient WasabiClient { get; }
@@ -413,6 +415,7 @@ namespace WalletWasabi.Services
}
StopCts.Dispose();
+ WasabiClientFactory.Dispose();
EnableRequests(); // Enable requests (it's possible something is being blocked outside the class by AreRequestsBlocked.

Dispose correctly.