From 96f5c585b74195e0f0e91d3efdf93ca7a4c833ae Mon Sep 17 00:00:00 2001 From: Jake Taylor <jake@elixxir.io> Date: Mon, 27 Dec 2021 17:26:29 -0600 Subject: [PATCH] first pass --- api/results.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/api/results.go b/api/results.go index 20d4871c5..333615c3a 100644 --- a/api/results.go +++ b/api/results.go @@ -151,13 +151,17 @@ 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 - if roundReport.RoundInfo == nil || roundReport.TimedOut { + if roundReport.RoundInfo == nil { allRoundsSucceeded = false + numResults-- + } else if roundReport.TimedOut { + // Generate a message to track all timed out rounds + timeoutRequest := &pb.HistoricalRounds{ + Rounds: []uint64{}, + } + go c.getHistoricalRounds(timeoutRequest, sendResults, commsInterface) } else { // If available, denote the result roundId := id.Round(roundReport.RoundInfo.ID) @@ -167,6 +171,7 @@ func (c *Client) getRoundResults(roundList []id.Round, timeout time.Duration, roundsResults[roundId] = Failed allRoundsSucceeded = false } + numResults-- } } } -- GitLab