Skip to content
Snippets Groups Projects
Commit caaab974 authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

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
...@@ -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
......
...@@ -25,7 +25,7 @@ import ( ...@@ -25,7 +25,7 @@ import (
"time" "time"
) )
const updateBufferLength = 1000 const updateBufferLength = 10000
// 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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment