Merge pull request #24 from yuhan6665/main

Fix fdConn unix.Connect err with go 1.20+
This commit is contained in:
2dust authored and GitHub committed 2023-09-01 22:37:15 +08:00
commit 789f481bb5
1 file changed
+1 -1
+1 -1
View File
@@ -289,7 +289,7 @@ func (d *ProtectedDialer) fdConn(ctx context.Context, ip net.IP, port int, fd in
sa := &unix.SockaddrInet6{
Port: port,
}
copy(sa.Addr[:], ip)
copy(sa.Addr[:], ip.To16())
if err := unix.Connect(fd, sa); err != nil {
log.Printf("fdConn unix.Connect err, Close Fd: %d Err: %v", fd, err)