diff --git a/httpu/httpu.go b/httpu/httpu.go index 44b0c58..c0cf207 100644 --- a/httpu/httpu.go +++ b/httpu/httpu.go @@ -5,6 +5,7 @@ import ( "bytes" "errors" "fmt" + "io" "log" "net" "net/http" @@ -122,7 +123,9 @@ func (httpu *HTTPUClient) Do(req *http.Request, timeout time.Duration, numSends // Parse response. response, err := http.ReadResponse(bufio.NewReader(bytes.NewBuffer(responseBytes[:n])), req) if err != nil { - log.Printf("httpu: error while parsing response: %v", err) + if err != io.ErrUnexpectedEOF { + log.Printf("httpu: error while parsing response: %v", err) + } continue }