From dd8d7224d0fc51360c33c790571b4f1e8714f91a Mon Sep 17 00:00:00 2001 From: Kevin Wang Date: Fri, 19 Jul 2024 18:52:23 -0400 Subject: [PATCH] fix test --- conn_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conn_test.go b/conn_test.go index db7c2ab4..8ce94b3f 100644 --- a/conn_test.go +++ b/conn_test.go @@ -1575,10 +1575,10 @@ func TestServerCertificate(t *testing.T) { }() cli, err := Client(dtlsnet.PacketConnFromConn(ca), ca.RemoteAddr(), tt.clientCfg) + hserr := cli.Handshake() if err == nil { _ = cli.Close() } - hserr := cli.Handshake() if !tt.wantErr && (err != nil || hserr != nil) { t.Errorf("Client failed(%v, %v)", err, hserr) }