fixing server side updating IP table

This commit is contained in:
2021-04-13 21:07:57 +04:00
parent b682f9d53d
commit f85f001a1c
2 changed files with 6 additions and 5 deletions

View File

@@ -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 {