From: phk Date: Wed, 6 Sep 2006 09:18:06 +0000 (+0000) Subject: Fix the same issue as in the kqueue acceptor: By the time we get X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fc9b2dfd8cb4a1bbc9698a6df2516bdd2084384;p=varnish Fix the same issue as in the kqueue acceptor: By the time we get here the filedescriptor may already be closed, so accept EBADF. Reported by: Xing Li git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@918 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_acceptor_epoll.c b/varnish-cache/bin/varnishd/cache_acceptor_epoll.c index e7de8676..39ae6389 100644 --- a/varnish-cache/bin/varnishd/cache_acceptor_epoll.c +++ b/varnish-cache/bin/varnishd/cache_acceptor_epoll.c @@ -37,7 +37,10 @@ vca_add(int fd, void *data) static void vca_del(int fd) { - AZ(epoll_ctl(epfd, EPOLL_CTL_DEL, fd, NULL)); + int i; + + i = epoll_ctl(epfd, EPOLL_CTL_DEL, fd, NULL); + assert(i == 0 || errno == EBADF); } static void