I have explicitly set the Sftp.Timeout property to 60 seconds, yet when I attempt to connect to an SFTP site, the connection times out after 20 seconds (actually a hair over 21 seconds), examining the timestamps.
There is a real SFTP site that I need to connect to that responds slowly at times. The 20 second timeout is often not long enough to establish the initial connection, though sometimes it barely manages to work.
Here is a log of trying to connect to an SFTP site that does not exist (just to demonstrate the Sftp.Timeout property being ignored):
2019-08-29 15:57:59.193 INFO Sftp(1) Info: Connecting to 192.168.3.33:22 using Sftp.
2019-08-29 15:57:59.195 INFO Sftp(1) Info: Assembly: Rebex.Sftp 2019 R3 for .NET 4.6-4.8
2019-08-29 15:57:59.197 INFO Sftp(1) Info: Platform: Windows 6.2.9200 32-bit; CLR: 4.0.30319.42000
2019-08-29 15:57:59.198 DEBUG Sftp(1) Info: Culture: en; Windows-1252
2019-08-29 15:58:20.232 ERROR Sftp(1) Info: Rebex.Net.ProxySocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.3.33:22
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at ciqf.Connect(EndPoint remoteEP)
at ciqi.mfai(IPEndPoint jp)
at ciqk.oiyr(EndPoint bju)
at Rebex.Net.ProxySocket.Connect(EndPoint remoteEP)
--- End of inner exception stack trace ---
at Rebex.Net.ProxySocket.Connect(EndPoint remoteEP)
at Rebex.Net.ProxySocket.Connect(String serverName, Int32 serverPort)
at Rebex.Net.Sftp.dvjm(String po, Int32 pp, SshParameters pq, valv pr)
Is there another setting that controls the timeout on the initial SFTP connection, or is this a bug that needs to be fixed?
I appreciate any help pointing me in the right direction!