fixing server side updating IP table
This commit is contained in:
@@ -46,8 +46,6 @@ func Server() error{
|
||||
ClientHost.Ipv4 = c.ClientIP()
|
||||
// Variable to store IP table information
|
||||
var IPTable p2p.IpAddresses
|
||||
//Add Client IP address to IPTable struct
|
||||
IPTable.IpAddress = append(IPTable.IpAddress, ClientHost)
|
||||
|
||||
// Receive file from POST request
|
||||
body, err := c.FormFile("json")
|
||||
@@ -69,6 +67,9 @@ func Server() error{
|
||||
|
||||
json.Unmarshal(file,&IPTable)
|
||||
|
||||
//Add Client IP address to IPTable struct
|
||||
IPTable.IpAddress = append(IPTable.IpAddress, ClientHost)
|
||||
|
||||
// Runs speed test to return only servers in the IP table pingable
|
||||
err = IPTable.SpeedTestUpdatedIPTable()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user