jedi4ever/veewee — pull request #892 by ejsarge (2014-01-24 19:19:36+00:00)
Title: SSH connection test now works if it can connect even without receiving the existing connection error.

tcp_test_ssh now checks the return from the second socket.connect_nonblock and will return true if that connection attempt was successful.

This fixed a problem on my system where tcp_test_ssh would never return successfully even though I could connect with ssh. It appears the cause was that the second socket.connect_nonblock would return success (0) and not the expected EISCONN. It is unclear to me why the original code expected an existing connection. Possibly it was expecting longer timeouts than my system might have.