diff options
author | Ivan Ristic <ivanr@webkreator.com> | 2015-08-05 08:10:02 +0200 |
---|---|---|
committer | Ivan Ristic <ivanr@webkreator.com> | 2015-08-05 08:10:02 +0200 |
commit | 941d63e6edd792f85ee2ef2d7b2d926aceda70fb (patch) | |
tree | 73117c2aac595df9dbc79ca24b5b68f2bb3f395f /ssllabs-scan.go | |
parent | 1cbaed8c74814258e4fe04bb5b69bd40071c55d5 (diff) | |
download | ssllabs-scan-941d63e6edd792f85ee2ef2d7b2d926aceda70fb.zip ssllabs-scan-941d63e6edd792f85ee2ef2d7b2d926aceda70fb.tar.gz ssllabs-scan-941d63e6edd792f85ee2ef2d7b2d926aceda70fb.tar.bz2 |
Fix retry on HTTP EOF.
Diffstat (limited to 'ssllabs-scan.go')
-rw-r--r-- | ssllabs-scan.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ssllabs-scan.go b/ssllabs-scan.go index 50aaeec..2baf732 100644 --- a/ssllabs-scan.go +++ b/ssllabs-scan.go @@ -391,19 +391,19 @@ func invokeGetRepeatedly(url string) (*http.Response, []byte, error) { return resp, body, nil } else { - if err.Error() == "EOF" { + if strings.Contains(err.Error(), "EOF") { // Server closed a persistent connection on us, which // Go doesn't seem to be handling well. So we'll try one // more time. if retryCount > 5 { - log.Fatalf("[ERROR] Too many HTTP requests (5) failed with EOF (ref#1)") + log.Fatalf("[ERROR] Too many HTTP requests (5) failed with EOF (ref#3)") } if logLevel >= LOG_DEBUG { - log.Printf("[DEBUG] HTTP request failed with EOF (ref#1)") + log.Printf("[DEBUG] HTTP request failed with EOF (ref#3)") } } else { - log.Fatalf("[ERROR] HTTP request failed: %v (ref#1)", err.Error()) + log.Fatalf("[ERROR] HTTP request failed: %v (ref#3)", err.Error()) } retryCount++ |