only log first error if retrying during get
This commit is contained in:
parent
99b4d9f521
commit
68bed3837c
|
@ -128,10 +128,10 @@ func GetJunkTimeout(url string, timeout time.Duration) (junk.Junk, error) {
|
||||||
}
|
}
|
||||||
resp, err := client.Do(req)
|
resp, err := client.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("first get failed: %s", err)
|
|
||||||
if timeout > 0 || !strings.Contains(err.Error(), "TLS handshake timeout") {
|
if timeout > 0 || !strings.Contains(err.Error(), "TLS handshake timeout") {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
log.Printf("first get failed: %s", err)
|
||||||
resp, err = client.Do(req)
|
resp, err = client.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in New Issue