fix: tuic err handle

This commit is contained in:
gVisor bot 2022-11-25 13:03:36 +08:00
parent 71c8ef54e6
commit ac47ee6bc0

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
}