added optmized approach to update IPTable

This commit is contained in:
2024-11-13 15:52:24 +00:00
parent ff105bf9e0
commit 0b0ae2df06
6 changed files with 78 additions and 58 deletions

View File

@@ -31,7 +31,7 @@ func AddCustomInformationToIPTable(text string) error {
if found {
table.WriteIpTable()
// update IPTable after modified entry
UpdateIpTableListClient()
go UpdateIpTableListClient()
} else {
return errors.New("start server with p2prc -s as the server is currently not running")
}

View File

@@ -64,10 +64,11 @@ func UpdateIpTable(IpAddress string, serverPort string, wg *sync.WaitGroup) erro
}
}
err = ipStruct.WriteIpTable()
if err != nil {
return err
}
// Not required to update IP table as speed test updates the IP Table
//err = ipStruct.WriteIpTable()
//if err != nil {
// return err
//}
wg.Done()