broker/WebSocketShim: Check RegisterFd() return

This commit is contained in:
Arne Welzel 2025-04-28 16:24:25 +02:00
parent 4101efed4f
commit d02588d25c

View file

@ -88,7 +88,10 @@ bool WebSocketShim::DoInit() {
state = std::make_unique<WebSocketState>();
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;
}