From f42841a6ab332a4078d01e81d5726f442b81fd00 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Thu, 25 May 2023 11:09:08 -0700 Subject: [PATCH] fix init order for EmbeddedNetworkController (#2014) --- controller/EmbeddedNetworkController.cpp | 12 +++++++++++- controller/EmbeddedNetworkController.hpp | 6 +++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/controller/EmbeddedNetworkController.cpp b/controller/EmbeddedNetworkController.cpp index 3f8316932..b60c375c4 100644 --- a/controller/EmbeddedNetworkController.cpp +++ b/controller/EmbeddedNetworkController.cpp @@ -466,11 +466,21 @@ EmbeddedNetworkController::EmbeddedNetworkController(Node *node,const char *ztPa , _node(node) , _ztPath(ztPath) , _path(dbPath) + , _signingId() + , _signingIdAddressString() , _sender((NetworkController::Sender *)0) , _db(this) + , _queue() + , _threads() + , _threads_l() + , _memberStatus() + , _memberStatus_l() + , _expiringSoon() + , _expiringSoon_l() + , _rc(rc) , _ssoExpiryRunning(true) , _ssoExpiry(std::thread(&EmbeddedNetworkController::_ssoExpiryThread, this)) - , _rc(rc) + #ifdef CENTRAL_CONTROLLER_REQUEST_BENCHMARK , _member_status_lookup{"nc_member_status_lookup",""} , _member_status_lookup_count{"nc_member_status_lookup_count",""} diff --git a/controller/EmbeddedNetworkController.hpp b/controller/EmbeddedNetworkController.hpp index d3f7e78ef..ef369be39 100644 --- a/controller/EmbeddedNetworkController.hpp +++ b/controller/EmbeddedNetworkController.hpp @@ -139,9 +139,6 @@ private: std::vector _threads; std::mutex _threads_l; - bool _ssoExpiryRunning; - std::thread _ssoExpiry; - std::unordered_map< _MemberStatusKey,_MemberStatus,_MemberStatusHash > _memberStatus; std::mutex _memberStatus_l; @@ -151,6 +148,9 @@ private: RedisConfig *_rc; std::string _ssoRedirectURL; + bool _ssoExpiryRunning; + std::thread _ssoExpiry; + #ifdef CENTRAL_CONTROLLER_REQUEST_BENCHMARK prometheus::simpleapi::benchmark_family_t _member_status_lookup; prometheus::simpleapi::counter_family_t _member_status_lookup_count;