summaryrefslogtreecommitdiffstats
path: root/libutils
diff options
context:
space:
mode:
Diffstat (limited to 'libutils')
-rw-r--r--libutils/Looper.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libutils/Looper.cpp b/libutils/Looper.cpp
index e69784d..5b0ff3a 100644
--- a/libutils/Looper.cpp
+++ b/libutils/Looper.cpp
@@ -567,7 +567,12 @@ int Looper::removeFd(int fd, int seq) {
#endif
scheduleEpollRebuildLocked();
} else {
+ // Some other error occurred. This is really weird because it means
+ // our list of callbacks got out of sync with the epoll set somehow.
+ // We defensively rebuild the epoll set to avoid getting spurious
+ // notifications with nowhere to go.
ALOGE("Error removing epoll events for fd %d, errno=%d", fd, errno);
+ scheduleEpollRebuildLocked();
return -1;
}
}