Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

SFTP downloads hang in 2025.1.0+ but work in 2025.0.0

Đang mở
#1,843 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
networking

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C#
Star
4.4k
Fork
990
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của sshnet/SSH.NET

Tất cả issue của sshnet/SSH.NET

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.