summaryrefslogtreecommitdiff
path: root/src/mongo/db/clientcursor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/clientcursor.cpp')
-rw-r--r--src/mongo/db/clientcursor.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/db/clientcursor.cpp b/src/mongo/db/clientcursor.cpp
index 68d8d790d59..8c489cb3b8e 100644
--- a/src/mongo/db/clientcursor.cpp
+++ b/src/mongo/db/clientcursor.cpp
@@ -286,8 +286,7 @@ public:
}
void run() {
- Client::initThread("clientcursormon");
- ON_BLOCK_EXIT([] { Client::destroy(); });
+ ThreadClient tc("clientcursormon", getGlobalServiceContext());
while (!globalInShutdownDeprecated()) {
{
const ServiceContext::UniqueOperationContext opCtx = cc().makeOperationContext();