Log error when event polling function failed.

pull/1/head
Tatsuhiro Tsujikawa 2011-03-20 15:22:42 +09:00
parent e95b8efc6b
commit 87ca37ea48
5 changed files with 16 additions and 2 deletions

View File

@ -123,8 +123,11 @@ void EpollEventPoll::poll(const struct timeval& tv)
KSocketEntry* p = reinterpret_cast<KSocketEntry*>(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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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