mirror of
https://github.com/oneclickvirt/backtrace.git
synced 2026-11-24 23:39:41 +08:00
fix: 减少等待时长
This commit is contained in:
1 parent
1fbb0758b6
commit
4c859e663e
1 file changed
+1
-1
+1
-1
@@ -70,7 +70,7 @@ func executeWithRetry(client *req.Client, url string, config retryConfig) (*req.
|
||||
lastErr = fmt.Errorf("attempt %d failed with HTTP status %d (timeout %v)", attempt+1, resp.StatusCode, timeout)
|
||||
}
|
||||
if attempt < config.maxRetries-1 {
|
||||
time.Sleep(3 * time.Second)
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
}
|
||||
return nil, fmt.Errorf("all %d attempts failed, last error: %w", config.maxRetries, lastErr)
|
||||
|
||||
Reference in new issue
Block a user