mirror of
https://github.com/woodchen-ink/proxy-go.git
synced 2025-07-18 08:31:55 +08:00
优化目标可访问性检查的上下文超时时间,将超时从5秒增加到15秒,以提高请求的稳定性和成功率。
This commit is contained in:
parent
cc45cac622
commit
1aed50444e
@ -353,7 +353,7 @@ func isTargetAccessible(client *http.Client, url string) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
req = req.WithContext(ctx)
|
req = req.WithContext(ctx)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user