more realistically, only (long) timeout errors can be fixed by retries

master
Ted Unangst 5 years ago
parent 0023fac43d
commit 1a095fdecf

@ -129,7 +129,7 @@ func GetJunkTimeout(url string, timeout time.Duration) (junk.Junk, error) {
resp, err := client.Do(req)
if err != nil {
log.Printf("first get failed: %s", err)
if timeout > 0 {
if timeout > 0 || !strings.Contains(err.Error(), "TLS handshake timeout") {
return nil, err
}
resp, err = client.Do(req)

Loading…
Cancel
Save