Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

SFTP downloads hang in 2025.1.0+ but work in 2025.0.0

Offen
#1,843 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
csharp
Bereich
networking

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
C#
Sterne
4.4k
Forks
990
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus sshnet/SSH.NET

Alle Issues in sshnet/SSH.NET

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.