fix: 减少重试次数

This commit is contained in:
spiritlhl 2025-08-05 16:26:03 +08:00 committed by GitHub
parent 4c859e663e
commit 476aac782d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,8 +50,8 @@ type retryConfig struct {
// 默认重试配置3次重试超时时间分别为3s、4s、5s // 默认重试配置3次重试超时时间分别为3s、4s、5s
var defaultRetryConfig = retryConfig{ var defaultRetryConfig = retryConfig{
maxRetries: 3, maxRetries: 2,
timeouts: []time.Duration{3 * time.Second, 4 * time.Second, 5 * time.Second}, timeouts: []time.Duration{5 * time.Second, 6 * time.Second},
} }
// executeWithRetry 执行带重试的HTTP请求 // executeWithRetry 执行带重试的HTTP请求