]> git.sur5r.net Git - openldap/commitdiff
ITS#8022 an async connect may still succeed immediately
authorHoward Chu <hyc@openldap.org>
Mon, 12 Jan 2015 22:27:58 +0000 (22:27 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 12 Jan 2015 22:27:58 +0000 (22:27 +0000)
libraries/libldap/request.c

index 3998168ff187598605c6509849dcce4b50ce3151..20a6c39ca0cba74f75da191c1cc70ad6a68dd383 100644 (file)
@@ -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 );
                                }