diff options
author | Adam Midvidy <amidvidy@gmail.com> | 2015-06-24 13:54:45 -0400 |
---|---|---|
committer | Adam Midvidy <amidvidy@gmail.com> | 2015-06-24 15:50:30 -0400 |
commit | 1fc9cba6988ab1b600be1a0549caf6146619e4df (patch) | |
tree | a5fcf53a04666b1bfc2ca43332cd824894154985 /src/mongo/shell/shell_utils.cpp | |
parent | 313c3bdc2547f2746639e84f8668a756ad95d8f3 (diff) | |
download | mongo-1fc9cba6988ab1b600be1a0549caf6146619e4df.tar.gz |
SERVER-19035 autodetect support for OP_COMMAND in remote servers
Diffstat (limited to 'src/mongo/shell/shell_utils.cpp')
-rw-r--r-- | src/mongo/shell/shell_utils.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/shell/shell_utils.cpp b/src/mongo/shell/shell_utils.cpp index 81dd1d5225f..36f6daa4d2d 100644 --- a/src/mongo/shell/shell_utils.cpp +++ b/src/mongo/shell/shell_utils.cpp @@ -352,7 +352,12 @@ void onConnect(DBClientWithCommands& c) { if (_nokillop) { return; } - c.setClientRPCProtocols(shellGlobalParams.rpcProtocols); + + // Only override the default rpcProtocols if they were set on the command line. + if (shellGlobalParams.rpcProtocols) { + c.setClientRPCProtocols(*shellGlobalParams.rpcProtocols); + } + connectionRegistry.registerConnection(c); } |