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() {
|
||||
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() {
|
||||
|
|
|
@ -69,7 +69,7 @@ public:
|
|||
~Trigger() override;
|
||||
|
||||
// Evaluates the condition. If true, executes the body and deletes
|
||||
// the object deleted.
|
||||
// the object.
|
||||
//
|
||||
// Returns the state of condition.
|
||||
bool Eval();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue