From a284ce33d42e3734994c51c1ee2285201ebdf542 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Thu, 27 Sep 2012 19:15:28 +0200 Subject: [PATCH] eloop: don't warn when removing bad fds from epoll-set People might want to close file-descriptors before destroying the ev_fd object if they actually have no direct control of it. For instance if used through a library. Signed-off-by: David Herrmann --- src/eloop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eloop.c b/src/eloop.c index c83dcb4..7762a27 100644 --- a/src/eloop.c +++ b/src/eloop.c @@ -1166,7 +1166,7 @@ static void fd_epoll_remove(struct ev_fd *fd) return; ret = epoll_ctl(fd->loop->efd, EPOLL_CTL_DEL, fd->fd, NULL); - if (ret) + if (ret && errno != EBADF) llog_warning(fd, "cannot remove fd %d from epoll set (%d): %m", fd->fd, errno); }