From: phk Date: Thu, 20 Sep 2007 08:23:21 +0000 (+0000) Subject: Use VBE_CheckFd() convenience function X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f75e4993248641ff05dfcad69d5571bdbc3280bc;p=varnish Use VBE_CheckFd() convenience function git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1966 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- 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++;