]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/request.c
Merge remote-tracking branch 'origin/mdb.RE/0.9'
[openldap] / libraries / libldap / request.c
index dcaa6ec49016d9609ce79c55ecf72e1bf0021980..c2d6dd445da85bebc267cb70bf4580d798880261 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2014 The OpenLDAP Foundation.
+ * Copyright 1998-2015 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -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 );