diff options
author | Misha Tyulenev <misha@mongodb.com> | 2017-07-31 17:10:07 -0400 |
---|---|---|
committer | Misha Tyulenev <misha@mongodb.com> | 2017-07-31 17:10:19 -0400 |
commit | c9638cd6bcb85f6f5371ca92226d37aecf3d045b (patch) | |
tree | 8ae3b3d4cd79805ca10742c3b4a16852856355a8 /src/mongo/client | |
parent | e3bdbd02624f5dce42aada11b84f28ff14f578da (diff) | |
download | mongo-c9638cd6bcb85f6f5371ca92226d37aecf3d045b.tar.gz |
SERVER-30249 wait for the signing keys to be available in mongos at startup
Diffstat (limited to 'src/mongo/client')
-rw-r--r-- | src/mongo/client/dbclient.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mongo/client/dbclient.cpp b/src/mongo/client/dbclient.cpp index 53f48e54c3b..6e95116c13e 100644 --- a/src/mongo/client/dbclient.cpp +++ b/src/mongo/client/dbclient.cpp @@ -483,13 +483,17 @@ void DBClientBase::logout(const string& dbname, BSONObj& info) { runCommand(dbname, BSON("logout" << 1), info); } -BSONObj ismastercmdobj = fromjson("{\"ismaster\":1}"); - bool DBClientBase::isMaster(bool& isMaster, BSONObj* info) { + BSONObjBuilder bob; + bob.append("ismaster", 1); + if (WireSpec::instance().isInternalClient) { + WireSpec::appendInternalClientWireVersion(WireSpec::instance().outgoing, &bob); + } + BSONObj o; if (info == 0) info = &o; - bool ok = runCommand("admin", ismastercmdobj, *info); + bool ok = runCommand("admin", bob.obj(), *info); isMaster = info->getField("ismaster").trueValue(); return ok; } |