From f82f5f9ec8f8c922121b73b9872ea9753a5bdbec Mon Sep 17 00:00:00 2001 From: Akilan Date: Wed, 25 Jan 2023 08:25:10 +0000 Subject: [PATCH] fix learning nodes --- client/clientIPTable/Iptable.go | 5 +++++ p2p/iptable.go | 1 + 2 files changed, 6 insertions(+) diff --git a/client/clientIPTable/Iptable.go b/client/clientIPTable/Iptable.go index fa8c1be..9a04de5 100644 --- a/client/clientIPTable/Iptable.go +++ b/client/clientIPTable/Iptable.go @@ -61,6 +61,11 @@ func UpdateIpTable(IpAddress string, serverPort string) error { } } + err = ipStruct.WriteIpTable() + if err != nil { + return err + } + return nil } diff --git a/p2p/iptable.go b/p2p/iptable.go index 43a978b..caaca81 100644 --- a/p2p/iptable.go +++ b/p2p/iptable.go @@ -155,6 +155,7 @@ func (table *IpAddresses) RemoveDuplicates() error { if table.IpAddress[i].NAT == "True" && table.IpAddress[i].EscapeImplementation == "None" { Exists = true } + if Exists { continue }