Make keepAliveRelease consistent between EventBase and VirtualEventBase
[folly.git] / folly / io / async / VirtualEventBase.h
index 426bd8a2ced9a78bf797fec402288ee5433772ac..ebf928aa6fc767401a616139e66df05595425042 100644 (file)
@@ -140,8 +140,8 @@ class VirtualEventBase : public folly::Executor, public folly::TimeoutManager {
   }
 
   void keepAliveRelease() override {
-    if (!getEventBase().inRunningEventBaseThread()) {
-      return getEventBase().add([=] { keepAliveRelease(); });
+    if (!inRunningEventBaseThread()) {
+      return add([=] { keepAliveRelease(); });
     }
     if (loopKeepAliveCountAtomic_.load()) {
       loopKeepAliveCount_ += loopKeepAliveCountAtomic_.exchange(0);