summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2017-07-28 09:46:34 -0400
committerAndrew Morrow <acm@mongodb.com>2017-07-29 09:31:08 -0400
commita402b45dfb18951a2c0de17d52e2f8dabc01b5d2 (patch)
tree64e735f3bcb632d2ebd10b2955189bd92b493998 /src/mongo/db
parent2318942c2ec98c0107a83d72f352d2878490ce09 (diff)
downloadmongo-a402b45dfb18951a2c0de17d52e2f8dabc01b5d2.tar.gz
SERVER-29920 Restore missing message once listening
Also, fix some broken parameter handling for the legacy transport
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/server_options_helpers.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/mongo/db/server_options_helpers.cpp b/src/mongo/db/server_options_helpers.cpp
index 52bf5e2022c..7cbd6013d32 100644
--- a/src/mongo/db/server_options_helpers.cpp
+++ b/src/mongo/db/server_options_helpers.cpp
@@ -817,14 +817,18 @@ Status storeServerOptions(const moe::Environment& params) {
}
if (params.count("net.serviceExecutor")) {
- if (serverGlobalParams.transportLayer == "legacy") {
- return {ErrorCodes::BadValue,
- "Cannot specify a serviceExecutor with the legacy transportLayer"};
- }
- const auto valid = {"synchronous"_sd, "fixedForTesting"_sd};
auto value = params["net.serviceExecutor"].as<std::string>();
- if (std::find(valid.begin(), valid.end(), value) == valid.end()) {
- return {ErrorCodes::BadValue, "Unsupported value for serviceExecutor"};
+ if (serverGlobalParams.transportLayer == "legacy") {
+ if (value != "synchronous"_sd) {
+ return {ErrorCodes::BadValue,
+ "Unsupported value for serviceExecutor with the legacy transportLayer, "
+ "must be \"synchronous\""};
+ }
+ } else {
+ const auto valid = {"synchronous"_sd, "fixedForTesting"_sd};
+ if (std::find(valid.begin(), valid.end(), value) == valid.end()) {
+ return {ErrorCodes::BadValue, "Unsupported value for serviceExecutor"};
+ }
}
serverGlobalParams.serviceExecutor = value;
} else {