Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
registration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package 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
registration
Commits
caaab974
Commit
caaab974
authored
4 years ago
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
properly handled failed polling state updates and increased the buffer size
parent
f5e5e050
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmd/poll.go
+7
-1
7 additions, 1 deletion
cmd/poll.go
storage/state.go
+1
-1
1 addition, 1 deletion
storage/state.go
with
8 additions
and
2 deletions
cmd/poll.go
+
7
−
1
View file @
caaab974
...
@@ -153,9 +153,15 @@ func (m *RegistrationImpl) Poll(msg *pb.PermissioningPoll, auth *connect.Auth,
...
@@ -153,9 +153,15 @@ func (m *RegistrationImpl) Poll(msg *pb.PermissioningPoll, auth *connect.Auth,
if
updateNotification
.
ToActivity
==
current
.
ERROR
{
if
updateNotification
.
ToActivity
==
current
.
ERROR
{
updateNotification
.
Error
=
msg
.
Error
updateNotification
.
Error
=
msg
.
Error
}
}
err
=
m
.
State
.
SendUpdateNotification
(
updateNotification
)
if
err
!=
nil
{
jww
.
WARN
.
Printf
(
"Failed to send update notification, "
+
"is the update thread running?"
)
n
.
GetPollingLock
()
.
Unlock
()
}
// Update occurred, report it to the control thread
// Update occurred, report it to the control thread
return
response
,
m
.
State
.
SendUpdateNotification
(
updateNotification
)
return
response
,
err
}
}
// PollNdf handles the client polling for an updated NDF
// PollNdf handles the client polling for an updated NDF
...
...
This diff is collapsed.
Click to expand it.
storage/state.go
+
1
−
1
View file @
caaab974
...
@@ -25,7 +25,7 @@ import (
...
@@ -25,7 +25,7 @@ import (
"time"
"time"
)
)
const
updateBufferLength
=
1000
const
updateBufferLength
=
1000
0
// NetworkState structure used for keeping track of NDF and Round state.
// NetworkState structure used for keeping track of NDF and Round state.
type
NetworkState
struct
{
type
NetworkState
struct
{
...
...
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