From ef6b62fde0923b474e9b60c209642caa234e7cc9 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Wed, 11 Oct 2023 23:49:17 +0200 Subject: fix dangling reference in BrokerFactory constructor --- src/broker.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/broker.cc b/src/broker.cc index 59c23bb..24d5c7b 100644 --- a/src/broker.cc +++ b/src/broker.cc @@ -14,7 +14,7 @@ using std::string; BrokerFactory::BrokerFactory() { - Parser p{Session::getInstance()}; + static Parser p{Session::getInstance()}; brokers.emplace(Session::State::NONAUTHENTICATED, Broker(p)); brokers.emplace(Session::State::AUTHENTICATED, Broker(p)); -- cgit v1.2.3