Commit 71d0dd7f authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Use fewer keep-alives in VirtualEventBase::keepAliveRelease

Summary:
[Folly] Use fewer keep-alives in `VirtualEventBase::keepAliveRelease`.

{D5982132} mistakenly used `VirtualEventBase::add`, which holds a keep-alive on the master `EventBase`, instead of calling `EventBase::add` directly.

(Note: this ignores all push blocking failures!)

Reviewed By: andriigrynenko

Differential Revision: D5992403

fbshipit-source-id: f427025c06f01e6a93d6eae8a051c3553f58be20
parent 25ddbd7f
...@@ -140,8 +140,8 @@ class VirtualEventBase : public folly::Executor, public folly::TimeoutManager { ...@@ -140,8 +140,8 @@ class VirtualEventBase : public folly::Executor, public folly::TimeoutManager {
} }
void keepAliveRelease() override { void keepAliveRelease() override {
if (!inRunningEventBaseThread()) { if (!evb_.inRunningEventBaseThread()) {
return add([=] { keepAliveRelease(); }); return evb_.add([=] { keepAliveRelease(); });
} }
if (loopKeepAliveCountAtomic_.load()) { if (loopKeepAliveCountAtomic_.load()) {
loopKeepAliveCount_ += loopKeepAliveCountAtomic_.exchange(0); loopKeepAliveCount_ += loopKeepAliveCountAtomic_.exchange(0);
......
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