RequestContext::create should call onUnset callback
[folly.git] / folly / io / async / Request.h
index 194305fc3727622cffd736b37d2cdbc9735e05ff..0f4d725633d2f87dfbbbbee088603092e095c2bf 100644 (file)
@@ -47,7 +47,7 @@ class RequestContext {
   // It will be passed between queues / threads (where implemented),
   // so it should be valid for the lifetime of the request.
   static void create() {
-    getStaticContext() = std::make_shared<RequestContext>();
+    setContext(std::make_shared<RequestContext>());
   }
 
   // Get the current context.