Set running flag to true before installing plugins (#849)

This commit is contained in:
An Tao 2021-05-12 23:50:29 +08:00 committed by GitHub
parent e478b63dda
commit 74b3ca3db6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -547,7 +547,8 @@ void HttpAppFrameworkImpl::run()
sessionManagerPtr_ =
std::make_unique<SessionManager>(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);