Handle EPOLLHUP and EPOLLERR.