From cf43cf180975b445d008c0268654d6bb48052ec9 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Fri, 20 Jun 2025 12:28:18 +0200 Subject: [PATCH] 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. --- .../policy/frameworks/cluster/backend/zeromq/connect.zeek | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/policy/frameworks/cluster/backend/zeromq/connect.zeek b/scripts/policy/frameworks/cluster/backend/zeromq/connect.zeek index 94aee459ae..44f1a4bf20 100644 --- a/scripts/policy/frameworks/cluster/backend/zeromq/connect.zeek +++ b/scripts/policy/frameworks/cluster/backend/zeromq/connect.zeek @@ -8,7 +8,11 @@ module Cluster::Backend::ZeroMQ; event zeek_init() &priority=10 { if ( run_proxy_thread ) - Cluster::Backend::ZeroMQ::spawn_zmq_proxy_thread(); + { + if ( ! Cluster::Backend::ZeroMQ::spawn_zmq_proxy_thread() ) + Reporter::fatal("Failed to spawn ZeroMQ proxy thread"); + } - Cluster::init(); + if ( ! Cluster::init() ) + Reporter::fatal("Failed initialize ZeroMQ backend"); }