]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
more keepalive ratio fixes
authorwessels <>
Sat, 1 Nov 1997 03:37:06 +0000 (03:37 +0000)
committerwessels <>
Sat, 1 Nov 1997 03:37:06 +0000 (03:37 +0000)
src/http.cc

index 3891d9a714068e8db2821c2dcb2de20eb92c7e0a..493bbadb85bf3499fd95d9f3b7fb6c4d0bdbe9b8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.211 1997/10/31 20:01:56 wessels Exp $
+ * $Id: http.cc,v 1.212 1997/10/31 20:37:06 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -905,10 +905,10 @@ httpSendRequest(int fd, void *data)
        BIT_SET(httpState->flags, HTTP_PROXYING);
     if (req->method == METHOD_GET) {
        if (p) {
-           d = (double) ++p->stats.n_keepalives_recv / p->stats.n_keepalives_sent;
+           d = (double) p->stats.n_keepalives_recv / (double) ++p->stats.n_keepalives_sent;
            if ((xcount++ & 0x3F) == 0)
                debug(0, 0) ("%s Keepalive Ratio = %f\n", p->host, d);
-           if (d > 0.50 ||  p->stats.n_keepalives_sent < 10)
+           if (d > 0.50 || p->stats.n_keepalives_sent < 10)
                BIT_SET(httpState->flags, HTTP_KEEPALIVE);
        } else {
            BIT_SET(httpState->flags, HTTP_KEEPALIVE);