From a9020a996f608a81d1f894e6c854c1e6edd485d7 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Thu, 1 Oct 2009 16:07:34 +0000 Subject: [PATCH] And by 'latency' we don't mean the round trip time. --- gateway.c | 8 ++++---- jcc.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) 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) { diff --git a/jcc.c b/jcc.c index a09621ec..7a23ea66 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.294 2009/09/18 18:57:20 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.295 2009/09/26 13:32:35 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -2488,7 +2488,7 @@ static void serve(struct client_state *csp) chat(csp); latency = (unsigned)(csp->server_connection.response_received - - csp->server_connection.request_sent); + csp->server_connection.request_sent) / 2; continue_chatting = (csp->config->feature_flags & RUNTIME_FEATURE_CONNECTION_KEEP_ALIVE) -- 2.39.2