mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-07 10:14:35 +00:00
fix http_connector
1. use ipv4 first when connect to http server. 2. allow redirect to url like: http://tcp://p.com:11010 3. dns should also use long timeout
This commit is contained in:
@@ -365,9 +365,12 @@ impl ManualConnectorManager {
|
||||
"cannot get ip from url"
|
||||
)));
|
||||
for ip_version in ip_versions {
|
||||
let use_long_timeout = dead_url.starts_with("http")
|
||||
|| dead_url.starts_with("srv")
|
||||
|| dead_url.starts_with("txt");
|
||||
let ret = timeout(
|
||||
// allow http connector to wait longer
|
||||
std::time::Duration::from_secs(if dead_url.starts_with("http") { 20 } else { 2 }),
|
||||
std::time::Duration::from_secs(if use_long_timeout { 20 } else { 2 }),
|
||||
Self::conn_reconnect_with_ip_version(
|
||||
data.clone(),
|
||||
dead_url.clone(),
|
||||
|
||||
Reference in New Issue
Block a user