cluster/PublishEvent:: Make event non-const

We want to introduce a hook that can modify the cluster event instances, so
need to pass around a non-const version of it.
This commit is contained in:
Arne Welzel 2025-04-07 13:50:24 +02:00
parent c4a48baeda
commit 90f94ff4f2
5 changed files with 11 additions and 8 deletions

View file

@ -454,7 +454,7 @@ void WebSocketEventDispatcher::HandleEvent(WebSocketClientEntry& entry, std::str
//
// Switching to a JSON v2 format that ensures all Zeek types are represented
// explicitly would help.
const auto& zeek_ev = cluster::detail::to_zeek_event(broker_ev);
auto zeek_ev = cluster::detail::to_zeek_event(broker_ev);
if ( ! zeek_ev ) {
entry.wsc->SendError(broker::enum_str(broker::ec::deserialization_failed), "failed to create Zeek event");
return;