In do_syncrepl, don't wait if a previous syncrepl thread is still running.

This commit is contained in:
Howard Chu 2008-02-12 18:49:37 +00:00
parent 8a7ae2def9
commit f26657d81c

View File

@ -1158,7 +1158,9 @@ do_syncrepl(
if ( si == NULL )
return NULL;
ldap_pvt_thread_mutex_lock( &si->si_mutex );
/* Don't wait around if there's a previous session still running */
if ( ldap_pvt_thread_mutex_trylock( &si->si_mutex ))
return NULL;
switch( abs( si->si_type ) ) {
case LDAP_SYNC_REFRESH_ONLY: