mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Add trigger_mgr to iosource_mgr later during startup
This fixes a potential crash due to trigger_mgr getting shutdown earlier than dns_mgr, and dns_mgr then trying to use it after it's been deleted. This change forces the order of initialization/destruction in iosource_mgr to cause dns_mgr to be deleted first.
This commit is contained in:
parent
117d25dcd8
commit
b26f4a83b3
3 changed files with 8 additions and 3 deletions
|
@ -504,7 +504,6 @@ void Trigger::Modified(notifier::detail::Modifiable* m)
|
|||
Manager::Manager() : iosource::IOSource()
|
||||
{
|
||||
pending = new TriggerList();
|
||||
iosource_mgr->Register(this, true);
|
||||
}
|
||||
|
||||
Manager::~Manager()
|
||||
|
@ -512,6 +511,11 @@ Manager::~Manager()
|
|||
delete pending;
|
||||
}
|
||||
|
||||
void Manager::InitPostScript()
|
||||
{
|
||||
iosource_mgr->Register(this, true);
|
||||
}
|
||||
|
||||
double Manager::GetNextTimeout()
|
||||
{
|
||||
return pending->empty() ? -1 : run_state::network_time + 0.100;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue