Skip to content

Commit

Permalink
Silence logging on malformed responses
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Nov 6, 2018
1 parent 656e61d commit 71efe62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion httpu/httpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"bytes"
"errors"
"fmt"
"io"
"log"
"net"
"net/http"
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 71efe62

Please sign in to comment.