Fix RequestContext held too long issue in EventBase
[folly.git] / folly / io / async / EventBase.cpp
index 340b2100d3d7a0826a3e43d6b95e63898422cbdd..c1ed73365413b866f367d2b4d5504012cb6dfb72 100644 (file)
@@ -612,7 +612,7 @@ bool EventBase::runLoopCallbacks() {
     while (!currentCallbacks.empty()) {
       LoopCallback* callback = &currentCallbacks.front();
       currentCallbacks.pop_front();
-      folly::RequestContextScopeGuard rctx(callback->context_);
+      folly::RequestContextScopeGuard rctx(std::move(callback->context_));
       callback->runLoopCallback();
     }