We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3b4779 commit f5de41fCopy full SHA for f5de41f
lib/src/HttpAppFrameworkImpl.cc
@@ -1033,7 +1033,7 @@ HttpAppFramework &HttpAppFrameworkImpl::createRedisClient(
1033
1034
void HttpAppFrameworkImpl::quit()
1035
{
1036
- if (getLoop()->isRunning())
+ if (getLoop()->isRunning() && running_.exchange(false))
1037
1038
getLoop()->queueInLoop([this]() {
1039
// Release members in the reverse order of initialization
@@ -1044,7 +1044,6 @@ void HttpAppFrameworkImpl::quit()
1044
pluginsManagerPtr_.reset();
1045
redisClientManagerPtr_.reset();
1046
dbClientManagerPtr_.reset();
1047
- running_ = false;
1048
getLoop()->quit();
1049
for (trantor::EventLoop *loop : ioLoopThreadPool_->getLoops())
1050
0 commit comments