Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: Slow failure reading non-existing file using SCP

$
0
0
Hi,

Just tried to reproduce it and it fails fast:
            var start = DateTime.Now;

            try
            {
                var scp = new ScpClient(res.host, int.Parse(res.port), res.user, res.password);
                scp.Connect();
                var file = new FileStream("bla", FileMode.OpenOrCreate, FileAccess.Write);
                scp.Download("bla", file);
                scp.Disconnect();
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception.Message);
            }
            finally
            {
                var end = DateTime.Now;
                Console.WriteLine("Time: " + (end - start));
            }

            Console.ReadLine();
=>
scp: bla: No such file or directory
Time: 00:00:00.5669936
Sounds like a problem, not a known/wanted behaviour.
Do you have other servers to test?

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>