mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
broker/WebSocketShim: Check RegisterFd() return
This commit is contained in:
parent
4101efed4f
commit
d02588d25c
1 changed files with 4 additions and 1 deletions
|
@ -88,7 +88,10 @@ bool WebSocketShim::DoInit() {
|
||||||
state = std::make_unique<WebSocketState>();
|
state = std::make_unique<WebSocketState>();
|
||||||
|
|
||||||
zeek::iosource_mgr->Register(iosrc, false);
|
zeek::iosource_mgr->Register(iosrc, false);
|
||||||
zeek::iosource_mgr->RegisterFd(state->hub.read_fd(), iosrc);
|
if ( ! zeek::iosource_mgr->RegisterFd(state->hub.read_fd(), iosrc) ) {
|
||||||
|
zeek::reporter->Error("Failed to register hub.read_fd() with iosource_mgr");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue