Skip to content
Snippets Groups Projects
Commit 93260fb1 authored by Jake Taylor's avatar Jake Taylor
Browse files

fix node registration buffer being filled with redundant calls

parent 77c6e1aa
No related branches found
No related tags found
1 merge request!170Release
......@@ -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,
......
......@@ -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())
}
......
......@@ -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)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment