SFTP downloads hang in 2025.1.0+ but work in 2025.0.0
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- csharp
- 领域
- networking
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- C#
- 星标
- 4.4k
- 派生
- 991
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
sshnet/SSH.NET 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 5/5 一周以上 新手友好度 45/100
-
ShellStream.Expect over-discards on undecodable bytes, driving ArrayBuffer.ActiveLength negative未关闭
难度 4/5 3-5 天 新手友好度 52/100
-
难度 3/5 1-2 天 新手友好度 68/100
-
难度 4/5 3-5 天 新手友好度 48/100
相似的 Issue
-
area:jobads-cv BE mvp P2
难度 2/5 1-3 小时 新手友好度 62/100
klasolsson81/jobbliggaren#2099 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 92/100
Esri/calcite-dotnet-toolkit#30 · 1 个 reaction ·
-
kind:docs simplification size:S status:todo
难度 2/5 1-3 小时 新手友好度 82/100
elsa-workflows/elsa-foundation#2604 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
ProwlEngine/Prowl#413 · 1 条评论 ·
维护者通常 1 天内回复
-
VideoViewer: rotated (portrait phone) videos shown sideways when system decimal separator is a comma未关闭
难度 2/5 1-3 小时 新手友好度 78/100