summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/transport/service_entry_point_impl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/transport/service_entry_point_impl.cpp b/src/mongo/transport/service_entry_point_impl.cpp
index 2dc1562ffdb..a988293b0ea 100644
--- a/src/mongo/transport/service_entry_point_impl.cpp
+++ b/src/mongo/transport/service_entry_point_impl.cpp
@@ -169,7 +169,7 @@ void ServiceEntryPointImpl::startSession(transport::SessionHandle session) {
<< connectionCount << word << " now open)";
}
- ssm->setCleanupHook([ this, ssmIt, session = std::move(session) ] {
+ ssm->setCleanupHook([ this, ssmIt, quiet, session = std::move(session) ] {
size_t connectionCount;
auto remote = session->remote();
{
@@ -179,9 +179,11 @@ void ServiceEntryPointImpl::startSession(transport::SessionHandle session) {
_currentConnections.store(connectionCount);
}
_shutdownCondition.notify_one();
- const auto word = (connectionCount == 1 ? " connection"_sd : " connections"_sd);
- log() << "end connection " << remote << " (" << connectionCount << word << " now open)";
+ if (!quiet) {
+ const auto word = (connectionCount == 1 ? " connection"_sd : " connections"_sd);
+ log() << "end connection " << remote << " (" << connectionCount << word << " now open)";
+ }
});
auto ownership = ServiceStateMachine::Ownership::kOwned;