count timeouts properly in socks proxy case

This commit is contained in:
David Rose 2004-01-30 19:28:54 +00:00
parent 1af9c20057
commit 528241b7ad
2 changed files with 5 additions and 3 deletions

View File

@ -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);

View File

@ -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;