diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index e5f732f446a2e58ae47d5819b2ffa5074b67ca60..1b008233b7c1f92ce6896dc1d0fbe9b2481594cb 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: