I am using VFS2 to upload file to remote hosts (FTP, SFTP) for my clients but sometimes i have to wait up to 5 minutes to get a timeout if connection is established but the server doesn't reply. E.g. apache vfs receives a connection from remote host on port 22 but on the remote host port 22 is used by ssh server not by SFTP server and that's why vfs waits 5 minutes for a reply before closing a connection (different protocols are used that's why the server cannot reply to a client). My question is how to configure VFS do not wait for a such long time and configure timeout for that case ?
Asked
Active
Viewed 1,097 times
1
-
What have you tried to set the timeout? – muasif80 Aug 20 '19 at 00:57
1 Answers
1
-
Hey. My config includes setConnectTimeout(this, 30000) for Ftp and Sftp . setSessionTimeoutMillis(this, 30000) is used for Sftp and for FTP i will try to use setDataTimeout(this, 30000) – Yuriy Korovko Aug 20 '19 at 08:27