Parcourir la source

fix test break

V2Ray il y a 10 ans
Parent
commit
751160940b
1 fichiers modifiés avec 1 ajouts et 3 suppressions
  1. 1 3
      net/address.go

+ 1 - 3
net/address.go

@@ -18,12 +18,10 @@ type Address struct {
 }
 
 func IPAddress(ip []byte, port uint16) Address {
-	ipCopy := make([]byte, 4)
-	copy(ipCopy, ip)
 	// TODO: check IP length
 	return Address{
 		Type:   AddrTypeIP,
-		IP:     net.IP(ipCopy),
+		IP:     net.IP(ip),
 		Domain: "",
 		Port:   port,
 	}