From fc20a118c26b23fd17212eaae2767f53db06cc9e Mon Sep 17 00:00:00 2001 From: sha512sum Date: Fri, 29 Mar 2024 00:21:04 +0000 Subject: [PATCH] Make the service context static --- include/cserver/engine/components.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cserver/engine/components.hpp b/include/cserver/engine/components.hpp index 3454218..3c333b0 100644 --- a/include/cserver/engine/components.hpp +++ b/include/cserver/engine/components.hpp @@ -332,7 +332,7 @@ struct ServiceContextBuilder { static constexpr auto Run() -> void { [] (utempl::TypeList...>) { - ServiceContext context; + static ServiceContext context; context.Run(); for(;;) { std::this_thread::sleep_for(std::chrono::minutes(1));