Skip to content

Commit

Permalink
Forgot to fix that lol
Browse files Browse the repository at this point in the history
  • Loading branch information
maddsua committed Feb 16, 2024
1 parent 00300ea commit 8810423
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/server/instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ void LambdaInstance::terminate() {
this->listener.stop();

// Request all connection workers to exit
#ifdef LAMBDA_BUILDOPTS_ENABLE_THREADJOIN
if (this->config.service.useThreadList) {
for (auto& worker : this->m_connections) {
worker.shutdownFlag = true;
}
#endif
}
}

void LambdaInstance::awaitFinished() {
Expand All @@ -127,13 +127,13 @@ void LambdaInstance::awaitFinished() {
this->serviceWorker.get();

// Wait until all connection workers done
#ifdef LAMBDA_BUILDOPTS_ENABLE_THREADJOIN
if (this->config.service.useThreadList) {
for (auto& item : this->m_connections) {
if (item.worker.joinable()) {
item.worker.join();
}
}
#endif
}
}

LambdaInstance::~LambdaInstance() {
Expand All @@ -150,13 +150,13 @@ LambdaInstance::~LambdaInstance() {
}

// Wait until all connection workers exited
#ifdef LAMBDA_BUILDOPTS_ENABLE_THREADJOIN
if (this->config.service.useThreadList) {
for (auto& item : this->m_connections) {
if (item.worker.joinable()) {
item.worker.join();
}
}
#endif
}
}

const ServerConfig& LambdaInstance::getConfig() const noexcept {
Expand Down

0 comments on commit 8810423

Please sign in to comment.