summaryrefslogtreecommitdiff
path: root/src/mongo/db/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/client.cpp')
-rw-r--r--src/mongo/db/client.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/client.cpp b/src/mongo/db/client.cpp
index acf26319b39..7da46be32df 100644
--- a/src/mongo/db/client.cpp
+++ b/src/mongo/db/client.cpp
@@ -188,14 +188,14 @@ ThreadClient::ThreadClient(StringData desc,
ServiceContext* serviceContext,
transport::SessionHandle session) {
invariantNoCurrentClient();
- _originalThreadName = getThreadNameRef();
+ _originalThreadName = ThreadName::get(ThreadContext::get());
Client::initThread(desc, serviceContext, std::move(session));
}
ThreadClient::~ThreadClient() {
invariant(currentClient);
currentClient.reset(nullptr);
- setThreadNameRef(std::move(_originalThreadName));
+ ThreadName::set(ThreadContext::get(), _originalThreadName);
}
Client* ThreadClient::get() const {