An error is raised immediately when the port is not available, but if I use a port that is not used for ssh it will hang for 5 minutes.
My system runs vsftp, so port 21 is open.
I tried the following:
Result:
The code will hang for 5 minutes at cli.handshake(sock)
I would expect to be able to set an reasonable timeout until an error is raised. For example 10 seconds.
I can't let the user to wait 5 minutes until he gets the feedback that the port is wrong.
An error is raised immediately when the port is not available, but if I use a port that is not used for ssh it will hang for 5 minutes. My system runs vsftp, so port 21 is open. I tried the following:
Result: The code will hang for 5 minutes at
cli.handshake(sock)
I would expect to be able to set an reasonable timeout until an error is raised. For example 10 seconds. I can't let the user to wait 5 minutes until he gets the feedback that the port is wrong.