Skip to content

Commit

Permalink
Fix: use domain first on direct dial (#672)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kr328 authored May 5, 2020
1 parent 94e0e4b commit b085add
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions adapters/outbound/direct.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ type Direct struct {
}

func (d *Direct) DialContext(ctx context.Context, metadata *C.Metadata) (C.Conn, error) {
address := net.JoinHostPort(metadata.Host, metadata.DstPort)
if metadata.DstIP != nil {
address = net.JoinHostPort(metadata.DstIP.String(), metadata.DstPort)
}
address := net.JoinHostPort(metadata.String(), metadata.DstPort)

c, err := dialer.DialContext(ctx, "tcp", address)
if err != nil {
Expand Down

0 comments on commit b085add

Please sign in to comment.