diff options
author | Reo Kimura <reo.kimura@mongodb.com> | 2020-07-22 03:03:43 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-14 18:57:06 +0000 |
commit | 97e16187ff3065d242a61a52e7b6edd4d439fb30 (patch) | |
tree | a7c528e43c3f3fef4116fadafb3384cccff8c04c /src/mongo/tools | |
parent | a629d56622ffb64025150fc674212267d2b5cf84 (diff) | |
download | mongo-97e16187ff3065d242a61a52e7b6edd4d439fb30.tar.gz |
SERVER-49072 Make ServiceExecutors into Decorations
Diffstat (limited to 'src/mongo/tools')
-rw-r--r-- | src/mongo/tools/bridge.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
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<ServiceEntryPointBridge>(serviceContext)); - serviceContext->setServiceExecutor( - std::make_unique<transport::ServiceExecutorSynchronous>(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<mongo::transport::TransportLayerASIO>( 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; } |