summaryrefslogtreecommitdiff
path: root/src/mongo/db/sessions_collection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/sessions_collection.cpp')
-rw-r--r--src/mongo/db/sessions_collection.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/db/sessions_collection.cpp b/src/mongo/db/sessions_collection.cpp
index b883bebf76c..0689ecfa1c2 100644
--- a/src/mongo/db/sessions_collection.cpp
+++ b/src/mongo/db/sessions_collection.cpp
@@ -156,9 +156,8 @@ SessionsCollection::SendBatchFn SessionsCollection::makeSendFnForBatchWrite(
const NamespaceString& ns, DBClientBase* client) {
auto send = [client, ns](BSONObj batch) {
BSONObj res;
- if (!client->runCommand(ns.db().toString(), batch, res)) {
- uassertStatusOK(getStatusFromCommandResult(res));
- }
+ client->runCommand(ns.db().toString(), batch, res);
+ uassertStatusOK(getStatusFromWriteCommandReply(res));
};
return send;