summaryrefslogtreecommitdiff
path: root/src/mongo/s/client/sharding_connection_hook.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/client/sharding_connection_hook.cpp')
-rw-r--r--src/mongo/s/client/sharding_connection_hook.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/s/client/sharding_connection_hook.cpp b/src/mongo/s/client/sharding_connection_hook.cpp
index bc72c6ea064..0a7374a240e 100644
--- a/src/mongo/s/client/sharding_connection_hook.cpp
+++ b/src/mongo/s/client/sharding_connection_hook.cpp
@@ -73,14 +73,14 @@ void ShardingConnectionHook::onCreate(DBClientBase* conn) {
if (conn->type() == ConnectionString::ConnectionType::kStandalone) {
- BSONObj helloResponse;
- if (!conn->runCommand("admin", BSON("hello" << 1), helloResponse)) {
- uassertStatusOK(getStatusFromCommandResult(helloResponse));
+ BSONObj isMasterResponse;
+ if (!conn->runCommand("admin", BSON("ismaster" << 1), isMasterResponse)) {
+ uassertStatusOK(getStatusFromCommandResult(isMasterResponse));
}
long long configServerModeNumber;
Status status =
- bsonExtractIntegerField(helloResponse, "configsvr", &configServerModeNumber);
+ bsonExtractIntegerField(isMasterResponse, "configsvr", &configServerModeNumber);
if (status == ErrorCodes::NoSuchKey) {
// This isn't a config server we're talking to.