diff --git a/src/libcharon/sa/trap_manager.c b/src/libcharon/sa/trap_manager.c index 148df3923..c35b8c0de 100644 --- a/src/libcharon/sa/trap_manager.c +++ b/src/libcharon/sa/trap_manager.c @@ -352,6 +352,10 @@ METHOD(trap_manager_t, uninstall, bool, entry_t *entry, *found = NULL; this->lock->write_lock(this->lock); + while (this->installing) + { + this->condvar->wait(this->condvar, this->lock); + } enumerator = this->traps->create_enumerator(this->traps); while (enumerator->enumerate(enumerator, &entry)) {