Browse Source

count timeouts properly in socks proxy case

David Rose 22 years ago
parent
commit
528241b7ad

+ 3 - 3
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);

+ 2 - 0
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;