mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
fix resource handling
This commit is contained in:
parent
21be582df7
commit
8f2342f92a
1 changed files with 2 additions and 2 deletions
|
|
@ -181,11 +181,11 @@ retry:;
|
|||
rc = ldap_bind_s( ld, manager, passwd, LDAP_AUTH_SIMPLE );
|
||||
if ( rc != LDAP_SUCCESS ) {
|
||||
ldap_perror( ld, "ldap_bind" );
|
||||
ldap_unbind_ext( ld, NULL, NULL );
|
||||
switch ( rc ) {
|
||||
case LDAP_BUSY:
|
||||
case LDAP_UNAVAILABLE:
|
||||
if ( do_retry > 0 ) {
|
||||
ldap_unbind_ext( ld, NULL, NULL );
|
||||
do_retry--;
|
||||
if ( delay != 0 ) {
|
||||
sleep( delay );
|
||||
|
|
@ -206,8 +206,8 @@ retry:;
|
|||
filter, attrs, 0, &res );
|
||||
if ( rc != LDAP_SUCCESS ) {
|
||||
ldap_perror( ld, "ldap_search" );
|
||||
ldap_unbind_ext( ld, NULL, NULL );
|
||||
if ( rc == LDAP_BUSY && do_retry > 0 ) {
|
||||
ldap_unbind_ext( ld, NULL, NULL );
|
||||
do_retry--;
|
||||
goto retry;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue