TorProcessManager: Implement `IAsyncDisposable`
MODIFY
WalletWasabi.Gui/Global.cs
WalletWasabi.Gui/Global.cs
@@ -487,7 +487,7 @@ namespace WalletWasabi.Gui
if (TorManager is { } torManager)
{
- await torManager.StopAsync().ConfigureAwait(false);
+ await torManager.DisposeAsync().ConfigureAwait(false);
Logger.LogInfo($"{nameof(TorManager)} is stopped.");
}

MODIFY
WalletWasabi.Tests/IntegrationTests/BlockstreamInfoTests.cs
WalletWasabi.Tests/IntegrationTests/BlockstreamInfoTests.cs
@@ -35,7 +35,7 @@ namespace WalletWasabi.Tests.IntegrationTests
{
ClearnetHttpClientFactory.Dispose();
TorHttpClientFactory.Dispose();
- await TorManager.StopAsync();
+ await TorManager.DisposeAsync();
}
[Fact]

MODIFY
WalletWasabi.Tests/IntegrationTests/LiveServerTests.cs
WalletWasabi.Tests/IntegrationTests/LiveServerTests.cs
@@ -44,7 +44,7 @@ namespace WalletWasabi.Tests.IntegrationTests
public async Task DisposeAsync()
{
TorHttpPool.Dispose();
- await TorManager.StopAsync();
+ await TorManager.DisposeAsync();
}
#region Blockchain

MODIFY
WalletWasabi.Tests/IntegrationTests/TorTests.cs
WalletWasabi.Tests/IntegrationTests/TorTests.cs
@@ -34,7 +34,7 @@ namespace WalletWasabi.Tests.IntegrationTests
public async Task DisposeAsync()
{
TorHttpPool.Dispose();
- await TorManager.StopAsync();
+ await TorManager.DisposeAsync();
}
[Fact]

MODIFY
WalletWasabi/Tor/TorProcessManager.cs
WalletWasabi/Tor/TorProcessManager.cs
@@ -15,7 +15,7 @@ namespace WalletWasabi.Tor
{
/// <summary>Manages lifetime of Tor process.</summary>
/// <seealso href="https://2019.www.torproject.org/docs/tor-manual.html.en"/>
- public class TorProcessManager
+ public class TorProcessManager : IAsyncDisposable
{
private bool _disposed = false;
@@ -201,7 +201,7 @@ namespace WalletWasabi.Tor
return client;
}
- public async Task StopAsync()
+ public async ValueTask DisposeAsync()
{
_disposed = true;

TorProcessManager: Implement `IAsyncDisposable`