mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-30 19:49:35 -05:00
Don't set ndelay on socket connect if no timeout was specified
This commit is contained in:
parent
5420344f05
commit
fc79957ad6
1 changed files with 2 additions and 2 deletions
|
|
@ -232,11 +232,11 @@ ldap_pvt_connect(LDAP *ld, ber_socket_t s,
|
|||
osip_debug(ld, "ldap_connect_timeout: fd: %d tm: %ld async: %d\n",
|
||||
s, opt_tv ? tv.tv_sec : -1L, async);
|
||||
|
||||
if ( ldap_pvt_ndelay_on(ld, s) == -1 )
|
||||
if ( opt_tv && ldap_pvt_ndelay_on(ld, s) == -1 )
|
||||
return ( -1 );
|
||||
|
||||
if ( connect(s, sin, addrlen) != AC_SOCKET_ERROR ) {
|
||||
if ( ldap_pvt_ndelay_off(ld, s) == -1 )
|
||||
if ( opt_tv && ldap_pvt_ndelay_off(ld, s) == -1 )
|
||||
return ( -1 );
|
||||
return ( 0 );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue