mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 11:08:20 +00:00
fix for Trigger's whose termination leads to deleting other Trigger's
This commit is contained in:
parent
ead4b681aa
commit
8e0a62bfec
2 changed files with 5 additions and 8 deletions
|
@ -58,13 +58,10 @@ void Registry::Modified(Modifiable* m) {
|
|||
}
|
||||
|
||||
void Registry::Terminate() {
|
||||
std::set<Receiver*> receivers;
|
||||
|
||||
for ( auto& r : registrations )
|
||||
receivers.emplace(r.second);
|
||||
|
||||
for ( auto& r : receivers )
|
||||
r->Terminate();
|
||||
while ( ! registrations.empty() ) {
|
||||
const auto& it = registrations.begin();
|
||||
it->second->Terminate();
|
||||
}
|
||||
}
|
||||
|
||||
Modifiable::~Modifiable() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue