Skip to content

Commit

Permalink
Fix connection leak on SSL failure
Browse files Browse the repository at this point in the history
When connecting to a server using SSL fails (i.e. with SSL disabled)
the connection was never freed.

Fixes lib#840
  • Loading branch information
adriansr committed Apr 2, 2019
1 parent d6156e1 commit 3055da2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ func (c *Connector) open(ctx context.Context) (cn *conn, err error) {

err = cn.ssl(o)
if err != nil {
cn.c.Close()
return nil, err
}

Expand Down

0 comments on commit 3055da2

Please sign in to comment.