summaryrefslogtreecommitdiff
path: root/src/mongo/client/dbclientinterface.h
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2017-07-24 14:53:55 -0400
committerMathias Stearn <mathias@10gen.com>2017-08-17 22:13:09 -0400
commit5f85627971603bf9f5c832f9d4ca2808b31b0efd (patch)
tree57cb296a3e55f20722e19bc0d80e1ad2b1f8fb9a /src/mongo/client/dbclientinterface.h
parent5aa60782cebed045a316b5cd6706be726178ce09 (diff)
downloadmongo-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.h10
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.