Skip to content

Commit

Permalink
fix!: dialer is a io.Closer (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
enocom committed Feb 8, 2022
1 parent 88e861c commit 89de96c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,13 @@ func (i *instrumentedConn) Close() error {
// Close closes the Dialer; it prevents the Dialer from refreshing the information
// needed to connect. Additional dial operations may succeed until the information
// expires.
func (d *Dialer) Close() {
func (d *Dialer) Close() error {
d.lock.Lock()
defer d.lock.Unlock()
for _, i := range d.instances {
i.Close()
}
return nil
}

func (d *Dialer) instance(connName string) (*cloudsql.Instance, error) {
Expand Down

0 comments on commit 89de96c

Please sign in to comment.