From 74b3ca3db678f7c1fcbef2e42401ac7b348d2984 Mon Sep 17 00:00:00 2001 From: An Tao Date: Wed, 12 May 2021 23:50:29 +0800 Subject: [PATCH] Set running flag to true before installing plugins (#849) --- lib/src/HttpAppFrameworkImpl.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/src/HttpAppFrameworkImpl.cc b/lib/src/HttpAppFrameworkImpl.cc index 25798df1..ed2959f4 100644 --- a/lib/src/HttpAppFrameworkImpl.cc +++ b/lib/src/HttpAppFrameworkImpl.cc @@ -547,7 +547,8 @@ void HttpAppFrameworkImpl::run() sessionManagerPtr_ = std::make_unique(getLoop(), sessionTimeout_); } - + // now start runing!! + running_ = true; // Initialize plugins const auto &pluginConfig = jsonConfig_["plugins"]; if (!pluginConfig.isNull()) @@ -560,9 +561,6 @@ void HttpAppFrameworkImpl::run() // TODO: new plugin }); } - - // now start runing!! - running_ = true; httpCtrlsRouterPtr_->init(ioLoops); httpSimpleCtrlsRouterPtr_->init(ioLoops); staticFileRouterPtr_->init(ioLoops);