projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
RequestContext::create should call onUnset callback
[folly.git]
/
folly
/
io
/
async
/
Request.cpp
diff --git
a/folly/io/async/Request.cpp
b/folly/io/async/Request.cpp
index 939ac2e0b93bbe53e917d1562e6647231cc80b68..8ea7f3e311789d82d576a4b401d6eced3114d24a 100644
(file)
--- a/
folly/io/async/Request.cpp
+++ b/
folly/io/async/Request.cpp
@@
-108,12
+108,12
@@
std::shared_ptr<RequestContext> RequestContext::setContext(
auto& prev = getStaticContext();
if (ctx != prev) {
using std::swap;
- if (ctx) {
- ctx->onSet();
- }
if (prev) {
prev->onUnset();
}
+ if (ctx) {
+ ctx->onSet();
+ }
swap(ctx, prev);
}
return ctx;