]> git.sur5r.net Git - openldap/commitdiff
Force sd close. Suggested by rajk@home.com
authorKurt Zeilenga <kurt@openldap.org>
Tue, 12 Oct 1999 18:51:36 +0000 (18:51 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 12 Oct 1999 18:51:36 +0000 (18:51 +0000)
libraries/libldap/request.c

index 6e4174e9365f5f10dc9324e237612100021ad1a0..aeb32ef92ba1ca8a34859841659024baeff56b7c 100644 (file)
@@ -410,12 +410,16 @@ ldap_free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind )
                        if ( unbind ) {
                                ldap_send_unbind( ld, lc->lconn_sb, NULL, NULL );
                        }
-                       ldap_close_connection( lc->lconn_sb );
-                       ber_pvt_sb_destroy( lc->lconn_sb );
-                       if( lc->lconn_ber != NULL ) {
-                               ber_free( lc->lconn_ber, 1 );
-                       }
                }
+
+               /* force closure */
+               ldap_close_connection( lc->lconn_sb );
+               ber_pvt_sb_destroy( lc->lconn_sb );
+
+               if( lc->lconn_ber != NULL ) {
+                       ber_free( lc->lconn_ber, 1 );
+               }
+
                prevlc = NULL;
                for ( tmplc = ld->ld_conns; tmplc != NULL;
                    tmplc = tmplc->lconn_next ) {