diff options
author | Mathias Stearn <mathias@10gen.com> | 2017-07-24 14:53:55 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2017-08-17 22:13:09 -0400 |
commit | 5f85627971603bf9f5c832f9d4ca2808b31b0efd (patch) | |
tree | 57cb296a3e55f20722e19bc0d80e1ad2b1f8fb9a /src/mongo/client/dbclientinterface.h | |
parent | 5aa60782cebed045a316b5cd6706be726178ce09 (diff) | |
download | mongo-5f85627971603bf9f5c832f9d4ca2808b31b0efd.tar.gz |
SERVER-28964 Close connection after seeing invalid OP_MSG flags
Diffstat (limited to 'src/mongo/client/dbclientinterface.h')
-rw-r--r-- | src/mongo/client/dbclientinterface.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/client/dbclientinterface.h b/src/mongo/client/dbclientinterface.h index 91e7033379d..a1a653fc9ef 100644 --- a/src/mongo/client/dbclientinterface.h +++ b/src/mongo/client/dbclientinterface.h @@ -756,6 +756,13 @@ public: virtual bool isMongos() const = 0; + /** + * Parses command replies and runs them through the metadata reader. + * This is virtual and non-const to allow subclasses to act on failures. + */ + virtual rpc::UniqueReply parseCommandReplyMessage(const std::string& host, + const Message& replyMsg); + protected: /** if the result of a command is ok*/ bool isOk(const BSONObj&); @@ -910,6 +917,9 @@ public: using DBClientBase::runCommandWithTarget; std::pair<rpc::UniqueReply, DBClientBase*> runCommandWithTarget(OpMsgRequest request) override; + rpc::UniqueReply parseCommandReplyMessage(const std::string& host, + const Message& replyMsg) override; + /** @return true if this connection is currently in a failed state. When autoreconnect is on, a connection will transition back to an ok state after reconnecting. |