fix: increase websocket peer connection timeout to 20 seconds (#1939)

- Add ws/wss protocols to long timeout list
This commit is contained in:
sky96111
2026-02-28 18:26:19 +08:00
committed by GitHub
parent fb95b4827c
commit b56bcfb4b0
+3 -1
View File
@@ -315,10 +315,12 @@ impl ManualConnectorManager {
for ip_version in ip_versions {
let use_long_timeout = dead_url.scheme() == "http"
|| dead_url.scheme() == "https"
|| dead_url.scheme() == "ws"
|| dead_url.scheme() == "wss"
|| dead_url.scheme() == "txt"
|| dead_url.scheme() == "srv";
let ret = timeout(
// allow http connector to wait longer
// allow http/websocket connector to wait longer
std::time::Duration::from_secs(if use_long_timeout { 20 } else { 2 }),
Self::conn_reconnect_with_ip_version(
data.clone(),