summaryrefslogtreecommitdiff
path: root/src/mongo/db/s
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s')
-rw-r--r--src/mongo/db/s/sharding_util.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/s/sharding_util.cpp b/src/mongo/db/s/sharding_util.cpp
index 9bd6c0ae795..7e82e09ebf5 100644
--- a/src/mongo/db/s/sharding_util.cpp
+++ b/src/mongo/db/s/sharding_util.cpp
@@ -95,13 +95,13 @@ std::vector<AsyncRequestsSender::Response> sendCommandToShards(
"Failed command {} for database '{}' on shard '{}'"_format(
command.toString(), dbName, StringData{response.shardId});
- auto shardResponse =
- uassertStatusOKWithContext(std::move(response.swResponse), errorContext);
+ uassertStatusOKWithContext(response.swResponse.getStatus(), errorContext);
+ const auto& respBody = response.swResponse.getValue().data;
- auto status = getStatusFromCommandResult(shardResponse.data);
+ const auto status = getStatusFromCommandResult(respBody);
uassertStatusOKWithContext(status, errorContext);
- auto wcStatus = getWriteConcernStatusFromCommandResult(shardResponse.data);
+ const auto wcStatus = getWriteConcernStatusFromCommandResult(respBody);
uassertStatusOKWithContext(wcStatus, errorContext);
}