fix: tuic err handle

This commit is contained in:
wwqgtxx 2022-11-25 13:03:36 +08:00
parent f542351404
commit 9976800a35

View file

@ -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
}