Skip to content

Commit

Permalink
[INLONG-11660][SDK] Close exist conns if initConns() failed in Golang…
Browse files Browse the repository at this point in the history
… SDK (#11664)
  • Loading branch information
gunli authored Jan 15, 2025
1 parent 004c2be commit 305f359
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ func (p *connPool) initConns(count int) error {

for err := range errs {
if err != nil {
for conn := range conns {
_ = conn.Close()
}
return err
}
}
Expand Down

0 comments on commit 305f359

Please sign in to comment.