diff options
author | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2018-08-03 16:36:00 -0400 |
---|---|---|
committer | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2018-08-06 18:15:06 -0400 |
commit | b079e4713d897b5541c2804386025817ec720800 (patch) | |
tree | bc999d0e8e67a493b08d18a2d8e15af8a40b5a46 /src/mongo/db/ttl.cpp | |
parent | 98dc4d98744a8da6567754345eb906ed01f5486f (diff) | |
download | mongo-b079e4713d897b5541c2804386025817ec720800.tar.gz |
SERVER-36400 Explicitly destroy the client on exiting run() of each BackgroundJob
Diffstat (limited to 'src/mongo/db/ttl.cpp')
-rw-r--r-- | src/mongo/db/ttl.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/db/ttl.cpp b/src/mongo/db/ttl.cpp index fa606a7b526..0896b5708bd 100644 --- a/src/mongo/db/ttl.cpp +++ b/src/mongo/db/ttl.cpp @@ -90,6 +90,7 @@ public: virtual void run() { Client::initThread(name().c_str()); + ON_BLOCK_EXIT([] { Client::destroy(); }); AuthorizationSession::get(cc())->grantInternalAuthorization(); while (!globalInShutdownDeprecated()) { |