From ac47ee6bc0cad400cea2d369015af8c5158de5e5 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Fri, 25 Nov 2022 13:03:36 +0800 Subject: [PATCH] fix: tuic err handle --- transport/tuic/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transport/tuic/client.go b/transport/tuic/client.go index ad5cb7e9..88f385a1 100644 --- a/transport/tuic/client.go +++ b/transport/tuic/client.go @@ -226,7 +226,7 @@ func (t *Client) DialContext(ctx context.Context, metadata *C.Metadata, dialFn f if err != nil { return nil, err } - stream, err := func() (quic.Stream, error) { + stream, err := func() (stream quic.Stream, err error) { defer func() { t.deferQuicConn(quicConn, err) }() @@ -235,7 +235,7 @@ func (t *Client) DialContext(ctx context.Context, metadata *C.Metadata, dialFn f if err != nil { return nil, err } - stream, err := quicConn.OpenStream() + stream, err = quicConn.OpenStream() if err != nil { return nil, err }