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
  • Loading branch information
gunli committed Jan 14, 2025
1 parent 9030cf3 commit dcb959d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,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 dcb959d

Please sign in to comment.