From f75e4993248641ff05dfcad69d5571bdbc3280bc Mon Sep 17 00:00:00 2001 From: phk Date: Thu, 20 Sep 2007 08:23:21 +0000 Subject: [PATCH] Use VBE_CheckFd() convenience function git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1966 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_backend_simple.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_backend_simple.c b/varnish-cache/bin/varnishd/cache_backend_simple.c index ffb71547..b7e9c143 100644 --- a/varnish-cache/bin/varnishd/cache_backend_simple.c +++ b/varnish-cache/bin/varnishd/cache_backend_simple.c @@ -39,7 +39,6 @@ #include #include #include -#include #include "shmlog.h" #include "cache.h" @@ -203,7 +202,6 @@ static struct vbe_conn * bes_nextfd(struct sess *sp) { struct vbe_conn *vc; - struct pollfd pfd; struct backend *bp; int reuse = 0; struct bes *bes; @@ -225,11 +223,7 @@ bes_nextfd(struct sess *sp) if (vc == NULL) break; - /* Test the connection for remote close before we use it */ - pfd.fd = vc->fd; - pfd.events = POLLIN; - pfd.revents = 0; - if (!poll(&pfd, 1, 0)) { + if (VBE_CheckFd(vc->fd)) { /* XXX locking of stats */ VSL_stats->backend_reuse += reuse; VSL_stats->backend_conn++; -- 2.39.5