From 204c808b41d2be5ce46e957f132c2df0e2b3683d Mon Sep 17 00:00:00 2001 From: Doug Hoyte Date: Thu, 9 Feb 2023 12:40:40 -0500 Subject: [PATCH] Monitors can't be stored in flat maps because we manage pointers into them in MonitorSets --- src/ActiveMonitors.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ActiveMonitors.h b/src/ActiveMonitors.h index 129b917..700fb11 100644 --- a/src/ActiveMonitors.h +++ b/src/ActiveMonitors.h @@ -1,5 +1,7 @@ #pragma once +#include + #include "golpe.h" #include "Subscription.h" @@ -13,9 +15,10 @@ struct ActiveMonitors : NonCopyable { Subscription sub; Monitor(Subscription &sub_) : sub(std::move(sub_)) {} + Monitor(const Monitor&) = delete; // pointers to filters inside sub must be stable because they are stored in MonitorSets }; - using ConnMonitor = flat_hash_map; + using ConnMonitor = std::unordered_map; flat_hash_map conns; // connId -> subId -> Monitor struct MonitorItem {