Commit 43e42d0c authored by Dan Melnic's avatar Dan Melnic Committed by Facebook Github Bot

CHECK(ev->ev_base) so we get a proper message instead of just a SIGSEGV

Summary: CHECK(ev->ev_base) so we get a proper message instead of just a SIGSEGV

Reviewed By: yfeldblum

Differential Revision: D7118625

fbshipit-source-id: 9426ac54fc32e0d34ad36df97708e3f0ae6043a9
parent 634f2652
...@@ -701,6 +701,9 @@ bool EventBase::scheduleTimeout(AsyncTimeout* obj, ...@@ -701,6 +701,9 @@ bool EventBase::scheduleTimeout(AsyncTimeout* obj,
tv.tv_usec = long((timeout.count() % 1000LL) * 1000LL); tv.tv_usec = long((timeout.count() % 1000LL) * 1000LL);
struct event* ev = obj->getEvent(); struct event* ev = obj->getEvent();
DCHECK(ev->ev_base);
if (event_add(ev, &tv) < 0) { if (event_add(ev, &tv) < 0) {
LOG(ERROR) << "EventBase: failed to schedule timeout: " << strerror(errno); LOG(ERROR) << "EventBase: failed to schedule timeout: " << strerror(errno);
return false; return false;
......
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