mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38: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() {
|
void Registry::Terminate() {
|
||||||
std::set<Receiver*> receivers;
|
while ( ! registrations.empty() ) {
|
||||||
|
const auto& it = registrations.begin();
|
||||||
for ( auto& r : registrations )
|
it->second->Terminate();
|
||||||
receivers.emplace(r.second);
|
}
|
||||||
|
|
||||||
for ( auto& r : receivers )
|
|
||||||
r->Terminate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Modifiable::~Modifiable() {
|
Modifiable::~Modifiable() {
|
||||||
|
|
|
@ -69,7 +69,7 @@ public:
|
||||||
~Trigger() override;
|
~Trigger() override;
|
||||||
|
|
||||||
// Evaluates the condition. If true, executes the body and deletes
|
// Evaluates the condition. If true, executes the body and deletes
|
||||||
// the object deleted.
|
// the object.
|
||||||
//
|
//
|
||||||
// Returns the state of condition.
|
// Returns the state of condition.
|
||||||
bool Eval();
|
bool Eval();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue