Move SSL socket to folly
[folly.git] / folly / io / async / AsyncTimeout.cpp
index 1bd5a831e63df3c74ac6975c8522064ff643cf5b..2f94f760491a8b5cfbf9c3d1d6c0c1efcfe7a32f 100644 (file)
@@ -44,9 +44,11 @@ AsyncTimeout::AsyncTimeout(EventBase* eventBase)
 
   event_set(&event_, -1, EV_TIMEOUT, &AsyncTimeout::libeventCallback, this);
   event_.ev_base = nullptr;
-  timeoutManager_->attachTimeoutManager(
+  if (eventBase) {
+    timeoutManager_->attachTimeoutManager(
       this,
       TimeoutManager::InternalEnum::NORMAL);
+  }
   RequestContext::getStaticContext();
 }