File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1558,6 +1558,7 @@ class DROGON_EXPORT HttpAppFramework : public trantor::NonCopyable
15581558 * @brief get the number of active connections.
15591559 */
15601560 virtual int64_t getConnectionCount () const = 0;
1561+ virtual HttpAppFramework &reset () = 0;
15611562
15621563 private:
15631564 virtual void registerHttpController (
Original file line number Diff line number Diff line change @@ -87,6 +87,15 @@ HttpAppFrameworkImpl::HttpAppFrameworkImpl()
8787{
8888}
8989
90+ HttpAppFramework &HttpAppFrameworkImpl::reset ()
91+ {
92+ listenerManagerPtr_ = std::make_unique<ListenerManager>();
93+ pluginsManagerPtr_ = std::make_unique<PluginsManager>();
94+ dbClientManagerPtr_ = std::make_unique<orm::DbClientManager>();
95+ redisClientManagerPtr_ = std::make_unique<nosql::RedisClientManager>();
96+ return *this ;
97+ }
98+
9099static std::function<void ()> f = [] {
91100 LOG_TRACE << " Initialize the main event loop in the main thread" ;
92101};
Original file line number Diff line number Diff line change @@ -637,6 +637,7 @@ class HttpAppFrameworkImpl final : public HttpAppFramework
637637 void findSessionForRequest (const HttpRequestImplPtr &req);
638638 HttpResponsePtr handleSessionForResponse (const HttpRequestImplPtr &req,
639639 const HttpResponsePtr &resp);
640+ HttpAppFramework &reset () override ;
640641
641642 private:
642643 void registerHttpController (const std::string &pathPattern,
You can’t perform that action at this time.
0 commit comments