Skip to content

Commit

Permalink
br: make sure connection is closed (#52594)
Browse files Browse the repository at this point in the history
close #52595
  • Loading branch information
RidRisR authored Apr 17, 2024
1 parent 1b3700c commit 7c4f4fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion br/pkg/conn/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,11 @@ func (mgr *Mgr) GetConfigFromTiKV(ctx context.Context, cli *http.Client, fn func
if e != nil {
return e
}
defer resp.Body.Close()
err = fn(resp)
if err != nil {
return err
}
_ = resp.Body.Close()
return nil
}, utils.NewPDReqBackoffer())
if err != nil {
Expand Down

0 comments on commit 7c4f4fa

Please sign in to comment.