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

re-check ram storage before timing out GetRoundresults

parent 33d3c912
No related branches found
No related tags found
2 merge requests!170Release,!144attempt to fix GetRoundResults by making the follower only send one RoundEvent...
......@@ -152,17 +152,28 @@ func (c *Client) getRoundResults(roundList []id.Round, timeout time.Duration,
roundCallback(false, true, roundsResults)
return
case roundReport := <-sendResults:
numResults--
// Skip if the round is nil (unknown from historical rounds)
// they default to timed out, so correct behavior is preserved
roundId := roundReport.RoundInfo.GetRoundId()
if roundReport.TimedOut {
roundInfo, err := networkInstance.GetRound(roundId)
// If we have the round in the buffer
if err == nil {
// Check if the round is done (completed or failed) or in progress
if states.Round(roundInfo.State) == states.COMPLETED {
roundsResults[roundId] = Succeeded
} else if states.Round(roundInfo.State) == states.FAILED {
roundsResults[roundId] = Failed
allRoundsSucceeded = false
}
return
}
allRoundsSucceeded = false
anyRoundTimedOut = true
} else {
// If available, denote the result
roundId := id.Round(roundReport.RoundInfo.ID)
if states.Round(roundReport.RoundInfo.State) == states.COMPLETED {
roundsResults[roundId] = Succeeded
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment