mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Add better error messaging when RegisterFd/UnregisterFd fail
This commit is contained in:
parent
0cfb115c1b
commit
fea0339aca
6 changed files with 39 additions and 19 deletions
|
@ -181,7 +181,8 @@ MsgThread::MsgThread() : BasicThread(), queue_in(this, 0), queue_out(0, this)
|
|||
failed = false;
|
||||
thread_mgr->AddMsgThread(this);
|
||||
|
||||
iosource_mgr->RegisterFd(flare.FD(), this);
|
||||
if ( ! iosource_mgr->RegisterFd(flare.FD(), this) )
|
||||
reporter->FatalError("Failed to register MsgThread fd with iosource_mgr");
|
||||
|
||||
SetClosed(false);
|
||||
}
|
||||
|
@ -190,7 +191,7 @@ MsgThread::~MsgThread()
|
|||
{
|
||||
// Unregister this thread from the iosource manager so it doesn't wake
|
||||
// up the main poll anymore.
|
||||
iosource_mgr->UnregisterFd(flare.FD());
|
||||
iosource_mgr->UnregisterFd(flare.FD(), this);
|
||||
}
|
||||
|
||||
// Set by Bro's main signal handler.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue