mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-09-10 17:25:51 +00:00
fix ca1849
https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1849
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user