rearl has asked for the wisdom of the Perl Monks concerning the following question:
I have code that is working - I can connect fine using Net::LDAP->new ( "ldaps://abc.def.com", port => 636, version => 3, timeout=>5 );, however, one time there was something wrong with the server and the connection attempt continued indefinitely, whereas I expected it to timeout after 5 seconds. I can reproduce this by changing ldaps to ldap - hense there is a port there but there should be no connection because of the different protocol. Any ideas ?
Comment on Net SSLeay timeout on connect does not seem to work
The first thing that comes to my mind about timeouts is the possiblity of a firewall running on the server. Can you check if any firewall is running on the server? Also, from the perldoc, there appears to be a debug option that you can turn on, for e.g.