Browse Source

connect-timeout -> http-connect-timeout

David Rose 22 năm trước cách đây
mục cha
commit
083370fffb

+ 4 - 5
panda/src/downloader/config_downloader.cxx

@@ -96,15 +96,14 @@ const bool http_proxy_tunnel =
 config_downloader.GetBool("http-proxy-tunnel", false);
 
 // This is the default amount of time to wait for a TCP/IP connection
-// to be established, in seconds.  It is presently only used for
-// nonblocking sockets.
-const double connect_timeout =
-config_downloader.GetDouble("connect-timeout", 5.0);
+// to be established, in seconds.
+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
-// (connect_timeout, above) and the request has been sent.
+// (http_connect_timeout, above) and the request has been sent.
 const double http_timeout =
 config_downloader.GetDouble("http-timeout", 20.0);
 

+ 1 - 1
panda/src/downloader/config_downloader.h

@@ -48,7 +48,7 @@ extern const string http_direct_hosts;
 extern const bool http_try_all_direct;
 extern const string http_proxy_username;
 extern const bool http_proxy_tunnel;
-extern const double connect_timeout;
+extern const double http_connect_timeout;
 extern const double http_timeout;
 extern const int http_max_connect_count;
 extern const string http_client_certificate_filename;

+ 1 - 1
panda/src/downloader/httpChannel.cxx

@@ -51,7 +51,7 @@ HTTPChannel(HTTPClient *client) :
   _persistent_connection = false;
   _allow_proxy = true;
   _proxy_tunnel = http_proxy_tunnel;
-  _connect_timeout = connect_timeout;
+  _connect_timeout = http_connect_timeout;
   _http_timeout = http_timeout;
   _blocking_connect = false;
   _download_throttle = false;