Fix hysteria outbound

This commit is contained in:
世界 2023-06-13 21:41:33 +08:00
parent a7f77d59c1
commit 4f12eba944
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
1 changed files with 2 additions and 0 deletions

View File

@ -267,12 +267,14 @@ func (h *Hysteria) open(ctx context.Context, reconnect bool) (quic.Connection, q
if nErr, ok := err.(net.Error); ok && !nErr.Temporary() && reconnect {
return h.open(ctx, false)
}
return nil, nil, err
}
stream, err := conn.OpenStream()
if err != nil {
if nErr, ok := err.(net.Error); ok && !nErr.Temporary() && reconnect {
return h.open(ctx, false)
}
return nil, nil, err
}
return conn, &hysteria.StreamWrapper{Stream: stream}, nil
}