vici: Signal waiting threads when removing a connection entry

If there are threads waiting in find_entry() and one in remove_entry()
and the latter is woken first by a thread calling put_entry(), the
former threads would remain stuck as they get never signaled.
This commit is contained in:
Tobias Brunner
2021-06-21 09:59:15 +02:00
parent 030e80957d
commit b0e2187b6b
+1
View File
@@ -244,6 +244,7 @@ static entry_t* remove_entry(private_vici_socket_t *this, u_int id)
break;
}
this->connections->remove_at(this->connections, enumerator);
entry->cond->broadcast(entry->cond);
found = entry;
break;
}