Skip to content

Commit

Permalink
feat: remove io copy from validator client
Browse files Browse the repository at this point in the history
  • Loading branch information
1995parham committed Dec 15, 2024
1 parent c9ccebf commit c266558
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions pkg/validator/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"errors"
"fmt"
"io"
"net/http"
"strings"
"time"
Expand Down Expand Up @@ -114,7 +113,6 @@ func (c *Client) Validate(parentCtx context.Context, headers http.Header, bearer
// closeBody to avoid memory leak when reusing http connection.
func closeBody(response *http.Response) {
if response != nil {
_, _ = io.Copy(io.Discard, response.Body)
_ = response.Body.Close()
}
}

0 comments on commit c266558

Please sign in to comment.