SFTP downloads hang in 2025.1.0+ but work in 2025.0.0
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 55/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- csharp
- Domínio
- networking
Direção de pesquisa
Diff the changes between the 2025.0.0 and 2025.1.0 tags to find what changed in the SFTP read path. Start with SftpFileStream (the OpenAsync/CopyToAsync path) and SftpClient.DownloadFileAsync under src/, focusing on async read loops and channel/window handling. Reproduce against a local SFTP server or the project's integration tests, and done means both download paths complete without hanging on the current version.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Summary
An SFTP download that completes successfully with SSH.NET 2025.0.0 hangs after upgrading to 2025.1.0 or 2026.0.0.
Versions tested
- Works: SSH.NET 2025.0.0
- Hangs: SSH.NET 2025.1.0
- Hangs: SSH.NET 2026.0.0
Environment
- .NET version: [insert]
- OS: [insert]
- SFTP server product and version: [insert]
Reproduction
The original implementation opens the remote file as an SftpFileStream and copies it to a local destination stream:
await using var fileStream = File.Create("file path");
await using var sftpFileStream = await client.OpenAsync(
"file name",
FileMode.Open,
FileAccess.Read,
CancellationToken.None);
await sftpFileStream.CopyToAsync(fileStream);
This completes with SSH.NET 2025.0.0. With 2025.1.0 and 2026.0.0, the operation does not complete.
I also tested the dedicated download API:
await using var fileStream = File.Create("file path");
await client.DownloadFileAsync(
"file name",
fileStream,
CancellationToken.None);
It hangs as well in 2025.1.0 and 2026.0.0.
Expected behavior
The file download should complete, as it does with SSH.NET 2025.0.0.
Actual behavior
The download hangs indefinitely with 2025.1.0 and 2026.0.0, without completing or throwing an exception.
- Linguagem predominante
- C#
- Estrelas
- 4.4k
- Forks
- 992
- Merge médio
- 9d 2h
- PRs com merge (30d)
- 2
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de sshnet/SSH.NET
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 45/100
-
ShellStream.Expect over-discards on undecodable bytes, driving ArrayBuffer.ActiveLength negativeAberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 52/100
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
-
Using SshClient on Linux under Wine throws System.Security.Cryptography.CryptographicExceptionAberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
Todas as issues de sshnet/SSH.NET
Issues semelhantes
-
bug priority: P2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Parameterless constructor is not a must-provided by user when a struct has a field initializerAberta:watch: Not Triaged dotnet-csharp/svc fundamentals/subsvc
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
Wrong values of Kernel32.FileShare.Delete and Kernel32.FileAttributes.PosixSemanticsTalvez já em andamento @ElectLive assumiu hoje. Abertabug good first issue help wanted
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 83/100
ForNeVeR/TruePath#241 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
files-community/Files#19047 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia