Commit eeb59fc3 authored by Andrii Grynenko's avatar Andrii Grynenko Committed by Facebook GitHub Bot

Make sure EventBase task destructor runs with the correct RequestContext

Reviewed By: yfeldblum

Differential Revision: D22604684

fbshipit-source-id: 4dedb9c831d0a2137d16bbe0514e00a1c8f77f4a
parent e914b363
...@@ -729,6 +729,9 @@ void NotificationQueue<MessageT>::Consumer::consumeMessages( ...@@ -729,6 +729,9 @@ void NotificationQueue<MessageT>::Consumer::consumeMessages(
messageAvailable(std::move(data->msg_)); messageAvailable(std::move(data->msg_));
destroyedFlagPtr_ = nullptr; destroyedFlagPtr_ = nullptr;
// Make sure message destructor is called with the correct RequestContext.
data.reset();
// If the callback was destroyed before it returned, we are done // If the callback was destroyed before it returned, we are done
if (callbackDestroyed) { if (callbackDestroyed) {
return; return;
......
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