From: Howard Chu Date: Mon, 12 Jan 2015 22:27:58 +0000 (+0000) Subject: ITS#8022 an async connect may still succeed immediately X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ae6347bac12bbf843678a838ca26089080705f81;p=openldap ITS#8022 an async connect may still succeed immediately --- diff --git a/libraries/libldap/request.c b/libraries/libldap/request.c index 3998168ff1..20a6c39ca0 100644 --- a/libraries/libldap/request.c +++ b/libraries/libldap/request.c @@ -485,6 +485,10 @@ ldap_new_connection( LDAP *ld, LDAPURLDesc **srvlist, int use_ldsb, if ( rc != -1 ) { srv = *srvp; + /* If we fully connected, async is moot */ + if ( rc == 0 ) + async = 0; + if ( ld->ld_urllist_proc && ( !async || rc != -2 ) ) { ld->ld_urllist_proc( ld, srvlist, srvp, ld->ld_urllist_params ); }