Skip to content

Commit

Permalink
Fix example_test.go
Browse files Browse the repository at this point in the history
Co-authored-by: Piotr Piotrowski <[email protected]>
  • Loading branch information
wallyqs and piotrpio authored Nov 29, 2022
1 parent 51c8882 commit d7099ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (sd *skipTLSDialer) Dial(network, address string) (net.Conn, error) {
}

func (sd *skipTLSDialer) SkipTLSHandshake() bool {
return true
return sd.skipTLS
}

func ExampleCustomDialer() {
Expand All @@ -74,7 +74,7 @@ func ExampleCustomDialer() {
// return true
// }
//
sd := &skipTLSDialer{dialer: &net.Dialer{Timeout: 2 * time.Second}}
sd := &skipTLSDialer{dialer: &net.Dialer{Timeout: 2 * time.Second}, skipTLS: true}
nc, _ := nats.Connect("demo.nats.io", nats.SetCustomDialer(sd))
defer nc.Close()
}
Expand Down

0 comments on commit d7099ff

Please sign in to comment.