sshnet / sshnet/SSH.NET

ScpClient.Download hangs under some circumstances regardless OperationTimout set

Offen
#255 6 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug
Vorherrschende Sprache
C#
Sterne
4.4k
Forks
993
Ø Merge
9 T. 21 Std.
Gemergte PRs (30 T.)
1

Beschreibung

ScpClient.Download hangs under some circumstances

       ScpClient scp = null;
       try
       {
       scp = new ScpClient(ip.ToString(), int.Parse(data.PortSSH), data.Login, data.Password);
       scp.OperationTimeout = new TimeSpan(0, 0, 10);
       scp.Connect();
       scp.Download(download, save);

There is probably some issue on server side, as scp on linux server ends like this:

[login@host ~]$ scp login@xxx.xxx.xxx.xxx:/file.exp ~/
login@xxx.xxx.xxx.xxx's password:
exec request failed on channel 0

This discussion can give you some more info, it seems to be related.
https://forum.mikrotik.com/viewtopic.php?t=104485
Server will be most probably updated, so I may not be able to try it again.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Start at the ScpClient.Connect and ScpClient.Download entry points and inspect how OperationTimeout is applied when the server returns "exec request failed on channel 0". The issue names no repository files or tests, so first reproduce the hang with a server exhibiting this response; done means the client no longer hangs and the timeout behavior is covered by an appropriate test.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp
Bereich
networking
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

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