still fixing patch on server side IP address
This commit is contained in:
@@ -2,9 +2,21 @@
|
|||||||
"ip_address": [
|
"ip_address": [
|
||||||
{
|
{
|
||||||
"ipv4": "145.40.90.151",
|
"ipv4": "145.40.90.151",
|
||||||
"latency": 139109233,
|
"latency": 136977360,
|
||||||
"download": 6.383175565123993,
|
"download": 6.439557936207414,
|
||||||
"upload": 896786.5894533413
|
"upload": 1247166.5933956294
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ipv4": "86.99.70.106",
|
||||||
|
"latency": 8933343,
|
||||||
|
"download": 201730.13853312942,
|
||||||
|
"upload": 2203225.5221644486
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ipv4": "86.99.70.106",
|
||||||
|
"latency": 0,
|
||||||
|
"download": 0,
|
||||||
|
"upload": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -64,14 +64,15 @@ func (ip *IpAddresses)SpeedTestUpdatedIPTable() error{
|
|||||||
}
|
}
|
||||||
|
|
||||||
// To ensure struct has no duplicates IP addresses
|
// To ensure struct has no duplicates IP addresses
|
||||||
DoNotRead := targets
|
//DoNotRead := targets
|
||||||
|
|
||||||
// Appends all IP addresses
|
// Appends all IP addresses
|
||||||
for i, _ := range targets.IpAddress {
|
for i, _ := range targets.IpAddress {
|
||||||
|
|
||||||
|
// To ensure that there are no duplicate IP addresses
|
||||||
Exists := false
|
Exists := false
|
||||||
for k := range DoNotRead.IpAddress {
|
for k := range ip.IpAddress {
|
||||||
if DoNotRead.IpAddress[k].Ipv4 == targets.IpAddress[i].Ipv4 {
|
if ip.IpAddress[k].Ipv4 == targets.IpAddress[i].Ipv4 {
|
||||||
Exists = true
|
Exists = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user