]> err.no Git - varnish/commitdiff
Fix the same issue as in the kqueue acceptor: By the time we get
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 6 Sep 2006 09:18:06 +0000 (09:18 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 6 Sep 2006 09:18:06 +0000 (09:18 +0000)
here the filedescriptor may already be closed, so accept EBADF.

Reported by: Xing Li <xing@litespeedtech.com>

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@918 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_acceptor_epoll.c

index e7de8676843ae33c9fdf2a6d05de3e4d67bb6be8..39ae63894b8e698fbc29fc31454f784723385261 100644 (file)
@@ -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