From: Howard Chu Date: Tue, 12 Feb 2008 18:49:37 +0000 (+0000) Subject: In do_syncrepl, don't wait if a previous syncrepl thread is still running. X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~157 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f26657d81c07297c7dfdf534a37f0930944116f9;p=openldap In do_syncrepl, don't wait if a previous syncrepl thread is still running. --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index e5f732f446..1b008233b7 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -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: