Quantcast
Channel: sshnet Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1026

Closed Issue: SftpClient is throwing undocumented exceptions [2148]

$
0
0
The documentation says that Connect can throw InvalidOperationException and ObjectDisposedException, but when you can't connect (remote server stopped, network problem, ...) a SocketException is thrown after a long timeout (about 10 seconds).

Worst, if you catch the exception and log the error another SocketException is thrown when you call Dispose. Documentation doesn't list any exceptions for Dispose.
Comments: Fixes in changeset 40626:

Fix exception documentation for BaseClient.Connect() and Session.Connect().
Added SftpPathNotFoundException to doc for SftpClient.Get(String) and SftpClient.GetAttributes(String).
Do not throw exception in Session.Disconnect() and Session.Dispose() when socket is not connected.

Viewing all articles
Browse latest Browse all 1026

Trending Articles