diff --git a/src/EpollEventPoll.cc b/src/EpollEventPoll.cc index 317ed8a0..4aff1161 100644 --- a/src/EpollEventPoll.cc +++ b/src/EpollEventPoll.cc @@ -123,8 +123,11 @@ void EpollEventPoll::poll(const struct timeval& tv) KSocketEntry* p = reinterpret_cast(epEvents_[i].data.ptr); p->processEvents(epEvents_[i].events); } + } else if(res == -1) { + int errNum = errno; + A2_LOG_INFO(fmt("epoll_wait error: %s", + util::safeStrerror(errNum).c_str())); } - #ifdef ENABLE_ASYNC_DNS // It turns out that we have to call ares_process_fd before ares's // own timeout and ares may create new sockets or closes socket in diff --git a/src/KqueueEventPoll.cc b/src/KqueueEventPoll.cc index 8e30440d..688bc91f 100644 --- a/src/KqueueEventPoll.cc +++ b/src/KqueueEventPoll.cc @@ -133,8 +133,10 @@ void KqueueEventPoll::poll(const struct timeval& tv) } p->processEvents(events); } + } else if(res == -1) { + int errNum = errno; + A2_LOG_INFO(fmt("kevent error: %s", util::safeStrerror(errNum).c_str())); } - #ifdef ENABLE_ASYNC_DNS // It turns out that we have to call ares_process_fd before ares's // own timeout and ares may create new sockets or closes socket in diff --git a/src/PollEventPoll.cc b/src/PollEventPoll.cc index e5933e24..9d0ddaad 100644 --- a/src/PollEventPoll.cc +++ b/src/PollEventPoll.cc @@ -111,6 +111,9 @@ void PollEventPoll::poll(const struct timeval& tv) } } } + } else if(res == -1) { + int errNum = errno; + A2_LOG_INFO(fmt("poll error: %s", util::safeStrerror(errNum).c_str())); } #ifdef ENABLE_ASYNC_DNS // It turns out that we have to call ares_process_fd before ares's diff --git a/src/PortEventPoll.cc b/src/PortEventPoll.cc index 10766a67..db4cb9fb 100644 --- a/src/PortEventPoll.cc +++ b/src/PortEventPoll.cc @@ -131,6 +131,9 @@ void PortEventPoll::poll(const struct timeval& tv) util::safeStrerror(errNum).c_str())); } } + } else if(res == -1) { + int errNum = errno; + A2_LOG_INFO(fmt("port_getn error: %s", util::safeStrerror(errNum).c_str())); } #ifdef ENABLE_ASYNC_DNS // It turns out that we have to call ares_process_fd before ares's diff --git a/src/SelectEventPoll.cc b/src/SelectEventPoll.cc index b541631d..3c40bd87 100644 --- a/src/SelectEventPoll.cc +++ b/src/SelectEventPoll.cc @@ -213,6 +213,9 @@ void SelectEventPoll::poll(const struct timeval& tv) } (*i)->processEvents(events); } + } else if(res == -1) { + int errNum = errno; + A2_LOG_INFO(fmt("select error: %s", util::safeStrerror(errNum).c_str())); } #ifdef ENABLE_ASYNC_DNS