From 528241b7ad3f44894affad5fb75261d80e7d1d73 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 30 Jan 2004 19:28:54 +0000 Subject: [PATCH] count timeouts properly in socks proxy case --- panda/src/downloader/config_downloader.cxx | 6 +++--- panda/src/downloader/httpChannel.cxx | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/panda/src/downloader/config_downloader.cxx b/panda/src/downloader/config_downloader.cxx index 5b795257f1..348bda809b 100644 --- a/panda/src/downloader/config_downloader.cxx +++ b/panda/src/downloader/config_downloader.cxx @@ -100,9 +100,9 @@ config_downloader.GetBool("http-proxy-tunnel", false); const double http_connect_timeout = config_downloader.GetDouble("http-connect-timeout", 10.0); -// This is the default amount of time to wait for the HTTP server to -// finish sending its response to our request, in seconds. It starts -// counting after the TCP connection has been established +// This is the default amount of time to wait for the HTTP server (or +// proxy) to finish sending its response to our request, in seconds. +// It starts counting after the TCP connection has been established // (http_connect_timeout, above) and the request has been sent. const double http_timeout = config_downloader.GetDouble("http-timeout", 20.0); diff --git a/panda/src/downloader/httpChannel.cxx b/panda/src/downloader/httpChannel.cxx index 8de050549f..258ef0dad5 100644 --- a/panda/src/downloader/httpChannel.cxx +++ b/panda/src/downloader/httpChannel.cxx @@ -1080,6 +1080,7 @@ run_socks_proxy_greet() { if (!server_send(string(socks_greeting, socks_greeting_len), true)) { return true; } + _sent_request_time = ClockObject::get_global_clock()->get_real_time(); // All done sending request. _state = S_socks_proxy_greet_reply; @@ -1169,6 +1170,7 @@ run_socks_proxy_connect() { if (!server_send(connect, true)) { return true; } + _sent_request_time = ClockObject::get_global_clock()->get_real_time(); _state = S_socks_proxy_connect_reply; return false;