cluster/zeromq/connect: Make failures fatal

The cluster is borked if the initialization fails, so may as well just
completely abort Zeek at that point with a fatal error. There's no real
point in continuing to run.
This commit is contained in:
Arne Welzel 2025-06-20 12:28:18 +02:00
parent a20a2fe6e0
commit cf43cf1809

View file

@ -8,7 +8,11 @@ module Cluster::Backend::ZeroMQ;
event zeek_init() &priority=10
{
if ( run_proxy_thread )
Cluster::Backend::ZeroMQ::spawn_zmq_proxy_thread();
Cluster::init();
{
if ( ! Cluster::Backend::ZeroMQ::spawn_zmq_proxy_thread() )
Reporter::fatal("Failed to spawn ZeroMQ proxy thread");
}
if ( ! Cluster::init() )
Reporter::fatal("Failed initialize ZeroMQ backend");
}