summaryrefslogtreecommitdiff
path: root/src/webserver_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webserver_main.cpp')
-rw-r--r--src/webserver_main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
index ff0bbd7420..c306dea958 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -65,8 +65,8 @@ static int run()
auto io = std::make_shared<boost::asio::io_context>();
App app(io);
- crow::connections::systemBus =
- std::make_shared<sdbusplus::asio::connection>(*io);
+ sdbusplus::asio::connection systemBus(*io);
+ crow::connections::systemBus = &systemBus;
// Static assets need to be initialized before Authorization, because auth
// needs to build the whitelist from the static routes
@@ -147,7 +147,8 @@ static int run()
app.run();
io->run();
- crow::connections::systemBus.reset();
+ crow::connections::systemBus = nullptr;
+
return 0;
}