summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-03-20 15:22:42 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-03-20 15:22:42 +0900
commit87ca37ea480b5bcc977c64cb3425aa3c8beb0b0e (patch)
tree2569a0fab6c79f071c701ca38d94638a66ff2135
parente95b8efc6b2e7503de2f13ee82e67205a2eab97e (diff)
Log error when event polling function failed.
-rw-r--r--src/EpollEventPoll.cc5
-rw-r--r--src/KqueueEventPoll.cc4
-rw-r--r--src/PollEventPoll.cc3
-rw-r--r--src/PortEventPoll.cc3
-rw-r--r--src/SelectEventPoll.cc3
5 files changed, 16 insertions, 2 deletions
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<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
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