From: Howard Chu Date: Thu, 13 May 2021 17:29:22 +0000 (+0100) Subject: ITS#9534,#9324 fix refresh startup X-Git-Tag: OPENLDAP_REL_ENG_2_6_0~217 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07e79471f94037cc60b860a740f99a8016c14270;p=thirdparty%2Fopenldap.git ITS#9534,#9324 fix refresh startup Partially revert 5aa7e0f69b0f1ef9aff5016fa6b40c2a2dd7d38d Use an explicit timeout for Refresh response. Need to give time for the provider to reply. --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 88fe16fdff..59f49d3e88 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -1247,6 +1247,13 @@ do_syncrep2( slap_dup_sync_cookie( &syncCookie_req, &si->si_syncCookie ); + if ( abs(si->si_type) == LDAP_SYNC_REFRESH_AND_PERSIST && si->si_refreshDone ) { + tout.tv_sec = 0; + } else { + /* Give some time for refresh response to arrive */ + tout.tv_sec = si->si_bindconf.sb_timeout_api; + } + while ( ( rc = ldap_result( si->si_ld, si->si_msgid, LDAP_MSG_ONE, &tout, &msg ) ) > 0 ) {