diff --git a/interfaces/params/network.go b/interfaces/params/network.go index d6f9ef1b01d6f493e8060febdb5e968ddb7f0a5c..67d083802e516de5d0feca95a299416489561a8a 100644 --- a/interfaces/params/network.go +++ b/interfaces/params/network.go @@ -46,7 +46,7 @@ func GetDefaultNetwork() Network { n := Network{ TrackNetworkPeriod: 100 * time.Millisecond, MaxCheckedRounds: 500, - RegNodesBufferLen: 500, + RegNodesBufferLen: 1000, NetworkHealthTimeout: 30 * time.Second, E2EParams: GetDefaultE2ESessionParams(), ParallelNodeRegistrations: 20, diff --git a/network/gateway/hostPool.go b/network/gateway/hostPool.go index 5bb0b82044058f8c51f055482cdd00a1b6bf37d9..43ae1481b9dcb01f732b12e6d6234fbc29acf5ff 100644 --- a/network/gateway/hostPool.go +++ b/network/gateway/hostPool.go @@ -578,7 +578,7 @@ func (h *HostPool) updateConns() error { return errors.Errorf("Unable to convert new NDF to set: %+v", err) } - // Filter out gateway IDs + // Filter out unwanted gateway IDs newMap = h.getFilter()(newMap, h.ndf) // Keep track of the old NDF set @@ -588,7 +588,7 @@ func (h *HostPool) updateConns() error { // Handle adding Gateways for gwId, ndfIdx := range newMap { - if _, ok := oldMap[gwId]; !ok { + if _, ok := oldMap[gwId]; !ok && gwId.GetType() == id.Gateway { // If GwId in newMap is not in ndfMap, add the Gateway h.addGateway(gwId.DeepCopy(), ndfIdx) } @@ -596,7 +596,7 @@ func (h *HostPool) updateConns() error { // Handle removing Gateways for gwId := range oldMap { - if _, ok := newMap[gwId]; !ok { + if _, ok := newMap[gwId]; !ok && gwId.GetType() == id.Gateway { // If GwId in ndfMap is not in newMap, remove the Gateway h.removeGateway(gwId.DeepCopy()) } diff --git a/network/gateway/sender.go b/network/gateway/sender.go index d09decce432779a13271667851159580dbc6f824..b3b029f369bd91ada4f023f5fd77bb336e682177 100644 --- a/network/gateway/sender.go +++ b/network/gateway/sender.go @@ -153,7 +153,7 @@ func (s *Sender) SendToPreferred(targets []*id.ID, sendFunc sendToPreferredFunc, for targetIdx := range proxies { // Return an error if the timeout duration is reached if netTime.Since(startTime) > timeout { - return nil, errors.Errorf("iterating over target's procies "+ + return nil, errors.Errorf("iterating over target's proxies "+ "timed out after %s", timeout) }