From ab0703b3c6ad1607fa224c5be2b893ddbdad365e Mon Sep 17 00:00:00 2001 From: Reo Kimura Date: Wed, 22 Jul 2020 03:03:43 +0000 Subject: SERVER-49072 Make ServiceExecutors into Decorations --- src/mongo/tools/bridge.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/mongo/tools') diff --git a/src/mongo/tools/bridge.cpp b/src/mongo/tools/bridge.cpp index 986114093ed..1c2f7d46bc9 100644 --- a/src/mongo/tools/bridge.cpp +++ b/src/mongo/tools/bridge.cpp @@ -485,10 +485,9 @@ int bridgeMain(int argc, char** argv) { setGlobalServiceContext(ServiceContext::make()); auto serviceContext = getGlobalServiceContext(); serviceContext->setServiceEntryPoint(std::make_unique(serviceContext)); - serviceContext->setServiceExecutor( - std::make_unique(serviceContext)); - - fassert(50766, serviceContext->getServiceExecutor()->start()); + if (auto status = serviceContext->getServiceEntryPoint()->start(); !status.isOK()) { + LOGV2(4907203, "Error starting service entry point", "error"_attr = status); + } transport::TransportLayerASIO::Options opts; opts.ipList.emplace_back("0.0.0.0"); @@ -497,13 +496,13 @@ int bridgeMain(int argc, char** argv) { serviceContext->setTransportLayer(std::make_unique( opts, serviceContext->getServiceEntryPoint())); auto tl = serviceContext->getTransportLayer(); - if (!tl->setup().isOK()) { - LOGV2(22922, "Error setting up transport layer"); + if (auto status = tl->setup(); !status.isOK()) { + LOGV2(22922, "Error setting up transport layer", "error"_attr = status); return EXIT_NET_ERROR; } - if (!tl->start().isOK()) { - LOGV2(22923, "Error starting transport layer"); + if (auto status = tl->start(); !status.isOK()) { + LOGV2(22923, "Error starting transport layer", "error"_attr = status); return EXIT_NET_ERROR; } -- cgit v1.2.1