Chore: code style

This commit is contained in:
yaling888
2022-06-15 04:29:19 +08:00
parent 0002064c07
commit f750bc96cb
21 changed files with 135 additions and 157 deletions

View File

@ -23,7 +23,7 @@ func (d *Direct) DialContext(ctx context.Context, metadata *C.Metadata, opts ...
tcpKeepAlive(c)
if !metadata.DstIP.IsValid() && c.RemoteAddr() != nil {
if !metadata.Resolved() && c.RemoteAddr() != nil {
if h, _, err := net.SplitHostPort(c.RemoteAddr().String()); err == nil {
metadata.DstIP = netip.MustParseAddr(h)
}