Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
93260fb1
Commit
93260fb1
authored
3 years ago
by
Jake Taylor
Browse files
Options
Downloads
Patches
Plain Diff
fix node registration buffer being filled with redundant calls
parent
77c6e1aa
No related branches found
No related tags found
1 merge request
!170
Release
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
interfaces/params/network.go
+1
-1
1 addition, 1 deletion
interfaces/params/network.go
network/gateway/hostPool.go
+3
-3
3 additions, 3 deletions
network/gateway/hostPool.go
network/gateway/sender.go
+1
-1
1 addition, 1 deletion
network/gateway/sender.go
with
5 additions
and
5 deletions
interfaces/params/network.go
+
1
−
1
View file @
93260fb1
...
...
@@ -46,7 +46,7 @@ func GetDefaultNetwork() Network {
n
:=
Network
{
TrackNetworkPeriod
:
100
*
time
.
Millisecond
,
MaxCheckedRounds
:
500
,
RegNodesBufferLen
:
5
00
,
RegNodesBufferLen
:
10
00
,
NetworkHealthTimeout
:
30
*
time
.
Second
,
E2EParams
:
GetDefaultE2ESessionParams
(),
ParallelNodeRegistrations
:
20
,
...
...
This diff is collapsed.
Click to expand it.
network/gateway/hostPool.go
+
3
−
3
View file @
93260fb1
...
...
@@ -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
())
}
...
...
This diff is collapsed.
Click to expand it.
network/gateway/sender.go
+
1
−
1
View file @
93260fb1
...
...
@@ -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 pro
c
ies "
+
return
nil
,
errors
.
Errorf
(
"iterating over target's pro
x
ies "
+
"timed out after %s"
,
timeout
)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment