Skip to content

Commit

Permalink
Merge pull request #495 from nkryuchkov/fix/ar-missing-port
Browse files Browse the repository at this point in the history
Fix missing port in address resolver response
  • Loading branch information
jdknives authored Aug 27, 2020
2 parents 4be1833 + 7b6db62 commit ffecd1c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/snet/directtp/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,12 @@ func (c *client) dialVisor(visorData arclient.VisorData) (net.Conn, error) {
}
}

return c.dial(visorData.RemoteAddr)
addr := visorData.RemoteAddr
if _, _, err := net.SplitHostPort(addr); err != nil {
addr = net.JoinHostPort(addr, visorData.Port)
}

return c.dial(addr)
}

// Listen creates a new listener for sudp.
Expand Down

0 comments on commit ffecd1c

Please sign in to comment.