summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mongo/embedded/mongoed_main.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mongo/embedded/mongoed_main.cpp b/src/mongo/embedded/mongoed_main.cpp
index 30d010f8e20..c43e95e09ef 100644
--- a/src/mongo/embedded/mongoed_main.cpp
+++ b/src/mongo/embedded/mongoed_main.cpp
@@ -85,7 +85,15 @@ int mongoedMain(int argc, char* argv[], char** envp) {
tl->shutdown();
}
- embedded::shutdown(serviceContext);
+ if (auto sep = serviceContext->getServiceEntryPoint()) {
+ if (sep->shutdown(Seconds(10))) {
+ embedded::shutdown(serviceContext);
+ } else {
+ log(logger::LogComponent::kNetwork) << "Failed to shutdown service entry point "
+ "within timelimit, skipping embedded "
+ "shutdown.";
+ }
+ }
});
setupSignalHandlers();