From: wessels <> Date: Sat, 1 Nov 1997 03:37:06 +0000 (+0000) Subject: more keepalive ratio fixes X-Git-Tag: SQUID_3_0_PRE1~4595 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=153cf740935801a05eba592c8cda31352023aba9;p=thirdparty%2Fsquid.git more keepalive ratio fixes --- diff --git a/src/http.cc b/src/http.cc index 3891d9a714..493bbadb85 100644 --- a/src/http.cc +++ b/src/http.cc @@ -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);