From: Howard Chu Date: Wed, 1 Apr 2015 19:45:35 +0000 (+0100) Subject: ITS#8090 fix for async connect X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f4069f325d8d82704dd8b41c1a62fc16b22340e5;p=openldap ITS#8090 fix for async connect --- diff --git a/libraries/libldap/request.c b/libraries/libldap/request.c index 3c1b41f76d..c2d6dd445d 100644 --- a/libraries/libldap/request.c +++ b/libraries/libldap/request.c @@ -128,7 +128,10 @@ ldap_send_initial_request( if ( ber_sockbuf_ctrl( ld->ld_sb, LBER_SB_OPT_GET_FD, &sd ) == -1 ) { /* not connected yet */ rc = ldap_open_defconn( ld ); - + if ( rc == 0 ) { + ber_sockbuf_ctrl( ld->ld_defconn->lconn_sb, + LBER_SB_OPT_GET_FD, &sd ); + } } if ( ld->ld_defconn && ld->ld_defconn->lconn_status == LDAP_CONNST_CONNECTING ) rc = ldap_int_check_async_open( ld, sd );