Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

SFTP downloads hang in 2025.1.0+ but work in 2025.0.0

未关闭
#1,843 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

sshnet/SSH.NET 的其他 Issue

查看 sshnet/SSH.NET 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。