diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index a921453294..30f4c63dc5 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -1214,8 +1214,9 @@ do_syncrepl( if ( si == NULL ) return NULL; - /* There will never be more than one instance active */ - ldap_pvt_thread_mutex_lock( &si->si_mutex ); + /* There must never be more than one instance active */ + if ( ldap_pvt_thread_mutex_trylock( &si->si_mutex )) + return NULL; switch( abs( si->si_type ) ) { case LDAP_SYNC_REFRESH_ONLY: