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
- 分支
- 990
- 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
-
type/automation type/tech-debt
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
area-integrations
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
:watch: Not Triaged dotnet-framework/svc install-deployment/subsvc
難度 1/5 1 小時以內 新手友好度 75/100
維護者通常 1 天內回覆
-
has-image has-readme needs-attention new-tool repo-verified
難度 1/5 1-3 小時 新手友好度 62/100
shanselman/TinyToolTown#844 · 2 則留言 ·
維護者通常 3 天內回覆
-
:watch: Not Triaged Pri3
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆