summaryrefslogtreecommitdiff
path: root/src/mongo/client
diff options
context:
space:
mode:
authorVojislav Stojkovic <vojislav.stojkovic@mongodb.com>2022-09-16 14:59:02 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-16 17:08:17 +0000
commitf81093713522be99a93571f0f3e5f0e16c4db600 (patch)
treee30d0a11a95b6056a02f5eda4f002b8bc97c1ba9 /src/mongo/client
parent2514cb0721a0df59601f3ff264a9a03d5015db71 (diff)
downloadmongo-f81093713522be99a93571f0f3e5f0e16c4db600.tar.gz
SERVER-69584 Pass ConnectionMetrics by shared_ptr
Diffstat (limited to 'src/mongo/client')
-rw-r--r--src/mongo/client/async_client.cpp2
-rw-r--r--src/mongo/client/async_client.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/client/async_client.cpp b/src/mongo/client/async_client.cpp
index b17d83b14c2..26e2f488ed2 100644
--- a/src/mongo/client/async_client.cpp
+++ b/src/mongo/client/async_client.cpp
@@ -67,7 +67,7 @@ Future<AsyncDBClient::Handle> AsyncDBClient::connect(
ServiceContext* const context,
transport::ReactorHandle reactor,
Milliseconds timeout,
- ConnectionMetrics* connectionMetrics,
+ std::shared_ptr<ConnectionMetrics> connectionMetrics,
std::shared_ptr<const transport::SSLConnectionContext> transientSSLContext) {
auto tl = context->getTransportLayer();
return tl
diff --git a/src/mongo/client/async_client.h b/src/mongo/client/async_client.h
index fcae5064069..7b7bcc39506 100644
--- a/src/mongo/client/async_client.h
+++ b/src/mongo/client/async_client.h
@@ -61,7 +61,7 @@ public:
ServiceContext* context,
transport::ReactorHandle reactor,
Milliseconds timeout,
- ConnectionMetrics* connectionMetrics, // must remain valid until the future is ready
+ std::shared_ptr<ConnectionMetrics> connectionMetrics,
std::shared_ptr<const transport::SSLConnectionContext> transientSSLContext = nullptr);
Future<executor::RemoteCommandResponse> runCommandRequest(