From 76383f5bd339607b33c50c5ce80282b31902bbd9 Mon Sep 17 00:00:00 2001 From: Marius Thesing Date: Thu, 14 Aug 2025 20:40:03 +0200 Subject: [PATCH] fix ca1849 https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1849 --- src/Renci.SshNet/SftpClient.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Renci.SshNet/SftpClient.cs b/src/Renci.SshNet/SftpClient.cs index afd2e206..df795671 100644 --- a/src/Renci.SshNet/SftpClient.cs +++ b/src/Renci.SshNet/SftpClient.cs @@ -2363,6 +2363,7 @@ namespace Renci.SshNet while (true) { +#pragma warning disable CA1849 // Call async methods when in an async method var bytesRead = isAsync #if NET ? await input.ReadAsync(buffer, cancellationToken).ConfigureAwait(false) @@ -2370,6 +2371,7 @@ namespace Renci.SshNet ? await input.ReadAsync(buffer, 0, buffer.Length, cancellationToken).ConfigureAwait(false) #endif : input.Read(buffer, 0, buffer.Length); +#pragma warning restore CA1849 // Call async methods when in an async method if (bytesRead == 0) {