Skip to content

SftpClient.ConnectAsync hangs #1411

Closed
@timurposhva

Description

@timurposhva

Hi!

When connecting to the sftp server, the method SftpClient.ConnectAsync hangs(timeout not working).

My configuration:
Timeout: 60s
OperationTimeout: 10s

OS: windows server 2019
SSH.NET version: 2024.0.0
NET version: 8.0

Stack trace:

System.OperationCanceledException: The operation was canceled. at System.Threading.CancellationToken.ThrowOperationCanceledException() at System.Threading.CancellationToken.ThrowIfCancellationRequested() at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token) at Renci.SshNet.Connection.ProtocolVersionExchange.SocketReadLineAsync(Socket socket, List1 buffer, CancellationToken cancellationToken) at Renci.SshNet.Connection.ProtocolVersionExchange.StartAsync(String clientVersion, Socket socket, CancellationToken cancellationToken) at Renci.SshNet.Session.ConnectAsync(CancellationToken cancellationToken) at Renci.SshNet.BaseClient.CreateAndConnectSessionAsync(CancellationToken cancellationToken) at Renci.SshNet.BaseClient.ConnectAsync(CancellationToken cancellationToken)

Thank you in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions