优化目标可访问性检查的上下文超时时间,将超时从5秒增加到15秒,以提高请求的稳定性和成功率。

This commit is contained in:
wood chen 2025-03-22 18:29:38 +08:00
parent cc45cac622
commit 1aed50444e

View File

@ -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)