make http connector timeout longer

http response may be slow, make its timeout longer.
This commit is contained in:
sijie.sun
2025-03-07 20:58:03 +08:00
committed by Sijie.Sun
parent 155f8a2ba2
commit 24213a874a
2 changed files with 8 additions and 6 deletions

View File

@@ -366,7 +366,8 @@ impl ManualConnectorManager {
)));
for ip_version in ip_versions {
let ret = timeout(
std::time::Duration::from_secs(1),
// allow http connector to wait longer
std::time::Duration::from_secs(if dead_url.starts_with("http") { 20 } else { 1 }),
Self::conn_reconnect_with_ip_version(
data.clone(),
dead_url.clone(),