I am using the following command to set timeout of lftp command so that if the server is not available or is not accepting any new connection, the command ends after 10 sec.
lftp -e 'set ftp:passive-mode true; set net:timeout 10; cd /OUT; mput $filename; bye' -u mylftpuser,mypassword myhost.com
However, the timeout does not seem to work. When I run the above command on the command prompt, it retries connecting after 30 sec, 45 sect ..60 sec ...and never ends.
Am I doing something wrong here?
Thanks.