Fix fdConn unix.Connect err with go 1.20+

This commit is contained in:
yuhan6665 committed 2023-08-26 18:03:09 -04:00
1 parent 607b5526a7
commit ead3de4d31
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)