Commit a1eb0703 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Use VBE_CheckFd() convenience function


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1966 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent c21cab75
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <poll.h>
#include "shmlog.h" #include "shmlog.h"
#include "cache.h" #include "cache.h"
...@@ -203,7 +202,6 @@ static struct vbe_conn * ...@@ -203,7 +202,6 @@ static struct vbe_conn *
bes_nextfd(struct sess *sp) bes_nextfd(struct sess *sp)
{ {
struct vbe_conn *vc; struct vbe_conn *vc;
struct pollfd pfd;
struct backend *bp; struct backend *bp;
int reuse = 0; int reuse = 0;
struct bes *bes; struct bes *bes;
...@@ -225,11 +223,7 @@ bes_nextfd(struct sess *sp) ...@@ -225,11 +223,7 @@ bes_nextfd(struct sess *sp)
if (vc == NULL) if (vc == NULL)
break; break;
/* Test the connection for remote close before we use it */ if (VBE_CheckFd(vc->fd)) {
pfd.fd = vc->fd;
pfd.events = POLLIN;
pfd.revents = 0;
if (!poll(&pfd, 1, 0)) {
/* XXX locking of stats */ /* XXX locking of stats */
VSL_stats->backend_reuse += reuse; VSL_stats->backend_reuse += reuse;
VSL_stats->backend_conn++; VSL_stats->backend_conn++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment