added optmized approach to update IPTable
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user