chore: reduce string split immediately after string concat (#773)

This commit is contained in:
Kiva
2023-09-29 08:51:13 +08:00
committed by GitHub
parent 10e7c533d7
commit 265a6b9b68
6 changed files with 9 additions and 13 deletions

View File

@ -46,7 +46,7 @@ type Hysteria struct {
}
func (h *Hysteria) DialContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (C.Conn, error) {
tcpConn, err := h.client.DialTCP(metadata.RemoteAddress(), h.genHdc(ctx, opts...))
tcpConn, err := h.client.DialTCP(metadata.String(), metadata.DstPort, h.genHdc(ctx, opts...))
if err != nil {
return nil, err
}