From d7099ff9daa3f43b2ff1684faccf5fe73ce0f0ec Mon Sep 17 00:00:00 2001 From: Waldemar Quevedo Date: Tue, 29 Nov 2022 14:52:38 -0800 Subject: [PATCH] Fix example_test.go Co-authored-by: Piotr Piotrowski --- example_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example_test.go b/example_test.go index c14792673..f8930dbaa 100644 --- a/example_test.go +++ b/example_test.go @@ -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() { @@ -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() }