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

This commit is contained in:
Ted Unangst 2019-07-11 01:25:50 -04:00
parent 0023fac43d
commit 1a095fdecf
1 changed files with 1 additions and 1 deletions

View File

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