mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
need some minimal timeout otherwise strange issues occur
This commit is contained in:
parent
3cb9d64de3
commit
075220dd7e
@ -286,7 +286,7 @@ ldap_back_start_tls(
|
||||
if ( rc == LDAP_SUCCESS ) {
|
||||
LDAPMessage *res = NULL;
|
||||
int retries = 1;
|
||||
struct timeval tv = { 0, 0 };
|
||||
struct timeval tv = { 0, 100000 };
|
||||
|
||||
retry:;
|
||||
rc = ldap_result( ld, msgid, LDAP_MSG_ALL, &tv, &res );
|
||||
@ -811,7 +811,7 @@ ldap_back_op_result(
|
||||
* remote server response */
|
||||
if ( ERR_OK( rs->sr_err ) ) {
|
||||
int rc;
|
||||
struct timeval tv = { 0, 0 };
|
||||
struct timeval tv = { 0, 100000 };
|
||||
|
||||
retry:;
|
||||
/* if result parsing fails, note the failure reason */
|
||||
|
@ -179,6 +179,7 @@ ldap_back_search(
|
||||
|
||||
} else {
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 100000;
|
||||
}
|
||||
|
||||
if ( op->ors_attrs ) {
|
||||
|
@ -211,7 +211,7 @@ rebind:;
|
||||
op->o_ctrls, NULL, &msgid );
|
||||
if ( rs->sr_err == LDAP_SUCCESS ) {
|
||||
LDAPMessage *res;
|
||||
struct timeval tv;
|
||||
struct timeval tv = { 0, 100000 };
|
||||
int rc;
|
||||
int nretries = mt->mt_nretries;
|
||||
|
||||
@ -234,6 +234,8 @@ retry:;
|
||||
if ( nretries > 0 ) {
|
||||
nretries--;
|
||||
}
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 100000;
|
||||
goto retry;
|
||||
}
|
||||
rs->sr_err = LDAP_BUSY;
|
||||
@ -380,7 +382,7 @@ rebind:;
|
||||
NULL, NULL, &msgid );
|
||||
if ( rc == LDAP_SUCCESS ) {
|
||||
LDAPMessage *res;
|
||||
struct timeval tv;
|
||||
struct timeval tv = { 0, 100000 };
|
||||
|
||||
/*
|
||||
* handle response!!!
|
||||
@ -401,6 +403,8 @@ retry:;
|
||||
if ( nretries > 0 ) {
|
||||
nretries--;
|
||||
}
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 100000;
|
||||
goto retry;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user