Skip to content

Commit

Permalink
Merge pull request #87 from james-d-elliott/fix-tls-config
Browse files Browse the repository at this point in the history
fix: tls config unused with dialer
  • Loading branch information
wneessen authored Dec 26, 2022
2 parents 6a7d49f + b864648 commit e7b162a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,11 @@ func (c *Client) DialWithContext(pc context.Context) error {
defer cfn()

nd := net.Dialer{}
td := tls.Dialer{}

var err error
if c.ssl {
td := tls.Dialer{NetDialer: &nd, Config: c.tlsconfig}

c.enc = true
c.co, err = td.DialContext(ctx, "tcp", c.ServerAddr())
}
Expand Down

0 comments on commit e7b162a

Please sign in to comment.