diff options
author | Matthew Russotto <matthew.russotto@mongodb.com> | 2019-11-07 17:59:54 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-11-07 17:59:54 +0000 |
commit | 74da85743816056b5b097b1e98b5e1b409790756 (patch) | |
tree | d72455631376203cdbdf48c6a245c4a5a36bc340 /src/mongo/client/dbclient_connection.cpp | |
parent | 64d293db1d52a192e3ec34c3a7674f6d342c0c42 (diff) | |
download | mongo-74da85743816056b5b097b1e98b5e1b409790756.tar.gz |
SERVER-44455 Fix handling of protocol version on reconnect in DBClient
Diffstat (limited to 'src/mongo/client/dbclient_connection.cpp')
-rw-r--r-- | src/mongo/client/dbclient_connection.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/client/dbclient_connection.cpp b/src/mongo/client/dbclient_connection.cpp index aba715197b8..f74f682ce44 100644 --- a/src/mongo/client/dbclient_connection.cpp +++ b/src/mongo/client/dbclient_connection.cpp @@ -220,6 +220,9 @@ Status DBClientConnection::connect(const HostAndPort& serverAddress, StringData return connectStatus; } + // Clear the auto-detected protocols from any previous connection. + _setServerRPCProtocols(rpc::supports::kOpQueryOnly); + // NOTE: If the 'applicationName' parameter is a view of the '_applicationName' member, as // happens, for instance, in the call to DBClientConnection::connect from // DBClientConnection::_checkConnection then the following line will invalidate the |