summaryrefslogtreecommitdiff
path: root/src/mongo/s/client/sharding_connection_hook.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/client/sharding_connection_hook.cpp')
-rw-r--r--src/mongo/s/client/sharding_connection_hook.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mongo/s/client/sharding_connection_hook.cpp b/src/mongo/s/client/sharding_connection_hook.cpp
index 36cb24bf9fc..057a9de1c4d 100644
--- a/src/mongo/s/client/sharding_connection_hook.cpp
+++ b/src/mongo/s/client/sharding_connection_hook.cpp
@@ -48,8 +48,8 @@ namespace mongo {
using std::string;
-ShardingConnectionHook::ShardingConnectionHook(
- bool shardedConnections, std::unique_ptr<rpc::ShardingEgressMetadataHook> egressHook)
+ShardingConnectionHook::ShardingConnectionHook(bool shardedConnections,
+ std::unique_ptr<rpc::EgressMetadataHook> egressHook)
: _shardedConnections(shardedConnections), _egressHook(std::move(egressHook)) {}
void ShardingConnectionHook::onCreate(DBClientBase* conn) {
@@ -77,11 +77,9 @@ void ShardingConnectionHook::onCreate(DBClientBase* conn) {
return _egressHook->readReplyMetadata(target, metadataObj);
});
}
- conn->setRequestMetadataWriter(
- [this](OperationContext* opCtx, BSONObjBuilder* metadataBob, StringData hostStringData) {
- return _egressHook->writeRequestMetadata(
- _shardedConnections, opCtx, hostStringData, metadataBob);
- });
+ conn->setRequestMetadataWriter([this](OperationContext* opCtx, BSONObjBuilder* metadataBob) {
+ return _egressHook->writeRequestMetadata(opCtx, metadataBob);
+ });
if (conn->type() == ConnectionString::MASTER) {