ScpClient.Download hangs under some circumstances regardless OperationTimout set
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 993
- Avg merge
- 9d 21h
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
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.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100