Commit 030a288b authored by Misha Shneerson's avatar Misha Shneerson Committed by Facebook GitHub Bot

periodic timers should not cause leaking of folly::RequestContext

Summary:
we do have some periodic maintentenance tasks... if those are initialized
lazily on a requests handling path, they  will capture current rctx and keep it
it alive forever.

Reviewed By: yfeldblum

Differential Revision: D22859344

fbshipit-source-id: 3655d874dee22aaf74b4d80631d4a58e83539752
parent 0b2e2a2d
...@@ -200,6 +200,7 @@ void FiberManager::doFibersPoolResizing() { ...@@ -200,6 +200,7 @@ void FiberManager::doFibersPoolResizing() {
void FiberManager::FibersPoolResizer::run() { void FiberManager::FibersPoolResizer::run() {
fiberManager_.doFibersPoolResizing(); fiberManager_.doFibersPoolResizing();
if (auto timer = fiberManager_.loopController_->timer()) { if (auto timer = fiberManager_.loopController_->timer()) {
RequestContextScopeGuard rctxGuard(std::shared_ptr<RequestContext>{});
timer->scheduleTimeout( timer->scheduleTimeout(
this, this,
std::chrono::milliseconds( std::chrono::milliseconds(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment