Forward cancellation tokens
MODIFY
WalletWasabi/BitcoinCore/CoreNode.cs
WalletWasabi/BitcoinCore/CoreNode.cs
@@ -258,7 +258,7 @@ public class CoreNode
Process process = Process.Start(startInfo)!;
- string responseString = await process.StandardOutput.ReadToEndAsync().ConfigureAwait(false);
+ string responseString = await process.StandardOutput.ReadToEndAsync(cancel).ConfigureAwait(false);
await process.WaitForExitAsync(cancel).ConfigureAwait(false);
if (process.ExitCode != 0)

MODIFY
WalletWasabi/Rpc/JsonRpcServer.cs
WalletWasabi/Rpc/JsonRpcServer.cs
@@ -53,7 +53,7 @@ public class JsonRpcServer : BackgroundService
if (request.HttpMethod == "POST")
{
using var reader = new StreamReader(request.InputStream);
- string body = await reader.ReadToEndAsync().ConfigureAwait(false);
+ string body = await reader.ReadToEndAsync(stoppingToken).ConfigureAwait(false);
if (IsAuthorized(context))
{

MODIFY
WalletWasabi/Services/SingleInstanceChecker.cs
WalletWasabi/Services/SingleInstanceChecker.cs
@@ -159,7 +159,7 @@ public class SingleInstanceChecker : BackgroundService, IAsyncDisposable
using var cts = CancellationTokenSource.CreateLinkedTokenSource(timeOutCts.Token, stoppingToken);
// The read operation cancellation will happen on reader disposal.
- string answer = await reader.ReadToEndAsync().WithAwaitCancellationAsync(cts.Token).ConfigureAwait(false);
+ string answer = await reader.ReadToEndAsync(cts.Token).ConfigureAwait(false);
if (answer == WasabiMagicString)
{
Logger.LogInfo($"Detected another Wasabi instance.");

Forward cancellation tokens