X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=gateway.c;h=0a77e0482472d0d59c3b89ff2773d29433501f5b;hp=0a98483216e0f185f26c67551c82cfacc182bd6b;hb=a9020a996f608a81d1f894e6c854c1e6edd485d7;hpb=8c3b1a6ae00b5609dfa74ae7c0c98981991ee05b diff --git a/gateway.c b/gateway.c index 0a984832..0a77e048 100644 --- a/gateway.c +++ b/gateway.c @@ -1,4 +1,4 @@ -const char gateway_rcs[] = "$Id: gateway.c,v 1.61 2009/09/10 14:59:34 fabiankeil Exp $"; +const char gateway_rcs[] = "$Id: gateway.c,v 1.62 2009/09/22 11:35:52 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/gateway.c,v $ @@ -7,7 +7,7 @@ const char gateway_rcs[] = "$Id: gateway.c,v 1.61 2009/09/10 14:59:34 fabiankeil * using a "forwarder" (i.e. HTTP proxy and/or a SOCKS4 * or SOCKS5 proxy). * - * Copyright : Written by and Copyright (C) 2001-2009 the SourceForge + * Copyright : Written by and Copyright (C) 2001-2009 the * Privoxy team. http://www.privoxy.org/ * * Based on the Internet Junkbuster originally written @@ -431,8 +431,8 @@ int close_unusable_connections(void) && (JB_INVALID_SOCKET != reusable_connection[slot].sfd)) { time_t time_open = time(NULL) - reusable_connection[slot].timestamp; - time_t latency = reusable_connection[slot].response_received - - reusable_connection[slot].request_sent; + time_t latency = (reusable_connection[slot].response_received - + reusable_connection[slot].request_sent) / 2; if (reusable_connection[slot].keep_alive_timeout < time_open + latency) {