Make it async to let RPC return
MODIFY
WalletWasabi.Gui/Program.cs
WalletWasabi.Gui/Program.cs
@@ -5,15 +5,12 @@ using Avalonia.Threading;
using AvalonStudio.Extensibility;
using AvalonStudio.Shell;
using AvalonStudio.Shell.Extensibility.Platforms;
-using Serilog.Configuration;
using Splat;
using System;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using System.Threading;
using System.Threading.Tasks;
-using WalletWasabi.Exceptions;
using WalletWasabi.Gui.CommandLine;
using WalletWasabi.Gui.CrashReport;
using WalletWasabi.Gui.ViewModels;

MODIFY
WalletWasabi.Gui/Rpc/WasabiJsonRpcService.cs
WalletWasabi.Gui/Rpc/WasabiJsonRpcService.cs
@@ -246,9 +246,9 @@ namespace WalletWasabi.Gui.Rpc
}
[JsonRpcMethod("stop")]
- public void Stop()
+ public async Task StopAsync()
{
- TerminateService.Terminate();
+ await Task.Run(() => TerminateService.Terminate());
}
private void AssertWalletIsLoaded()

Make it async to let RPC return