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

Replies are listed 'Best First'.
Re: Net SSLeay timeout on connect does not seem to work
by linuxfan (Beadle) on Aug 11, 2005 at 02:14 UTC
    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.
    $Net::SSLeay::trace = 2;
    This may give you more insight into the connection between your client and server.

    Try the above possiblities and see if either helps solve your problem.