Skip to content

Commit

Permalink
fix: log.Error doesnt need a new line character
Browse files Browse the repository at this point in the history
  • Loading branch information
benwaples committed Apr 2, 2024
1 parent 2c4e34d commit 3f3dabe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/rest/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func (s *restClient) send(req *http.Request) (*http.Response, error) {
// Try the request
if res, err = s.http.Do(req); err != nil {
if IsClosedConnectionErr(err) {
fmt.Printf("remote host force closed connection while requesting %s; attempt %d/%d; trying again\n", req.URL, retry+1, maxRetries)
fmt.Printf("remote host force closed connection while requesting %s; attempt %d/%d; trying again...\n", req.URL, retry+1, maxRetries)
ExponentialBackoff(retry)
continue
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func ingest(ctx context.Context, bheUrl url.URL, bheClient *http.Client, in <-ch
if response, err := bheClient.Do(req); err != nil {
if rest.IsClosedConnectionErr(err) {
// try again on force closed connection
log.Error(err, "remote host force closed connection while requesting %s; attempt %d/%d; trying again...\n", req.URL, retry+1, maxRetries)
log.Error(err, "remote host force closed connection while requesting %s; attempt %d/%d; trying again...", req.URL, retry+1, maxRetries)
rest.ExponentialBackoff(retry)

if retry == maxRetries-1 {
Expand Down Expand Up @@ -288,7 +288,7 @@ func do(bheClient *http.Client, req *http.Request) (*http.Response, error) {
if res, err = bheClient.Do(req); err != nil {
if rest.IsClosedConnectionErr(err) {
// try again on force closed connections
log.Error(err, "remote host force closed connection while requesting %s; attempt %d/%d; trying again...\n", req.URL, retry+1, maxRetries)
log.Error(err, "remote host force closed connection while requesting %s; attempt %d/%d; trying again...", req.URL, retry+1, maxRetries)
rest.ExponentialBackoff(retry)
continue
}
Expand Down

0 comments on commit 3f3dabe

Please sign in to comment.