I am connecting to an LDAP server over SSL ie Net::LDAP->new ( "ldaps://...., timeout=>10); however, it does not time out when the server is not responding. If the server is not there it comes back in error immediately, but as long as it hits an available port and doesn't get a correct handshake, it will wait forever. Any suggestions or experience around this issue ?