From 4f23b48a1d30f8d7eff100ac2d9ef09eb5db570b Mon Sep 17 00:00:00 2001 From: Jake Taylor <jake@elixxir.io> Date: Wed, 5 Jan 2022 14:01:11 -0600 Subject: [PATCH] report timeouts more aggressively --- api/results.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/results.go b/api/results.go index 1e8a75bab..4f5668fc9 100644 --- a/api/results.go +++ b/api/results.go @@ -89,6 +89,7 @@ func (c *Client) getRoundResults(roundList []id.Round, timeout time.Duration, roundEvents := c.GetRoundEvents() roundsResults := make(map[id.Round]RoundResult) allRoundsSucceeded := true + anyRoundTimedOut := false numResults := 0 oldestRound := networkInstance.GetOldestRoundID() @@ -141,7 +142,7 @@ func (c *Client) getRoundResults(roundList []id.Round, timeout time.Duration, // If we know about all rounds, return if numResults == 0 { - roundCallback(allRoundsSucceeded, false, roundsResults) + roundCallback(allRoundsSucceeded, anyRoundTimedOut, roundsResults) return } @@ -158,6 +159,7 @@ func (c *Client) getRoundResults(roundList []id.Round, timeout time.Duration, // they default to timed out, so correct behavior is preserved if roundReport.TimedOut { allRoundsSucceeded = false + anyRoundTimedOut = true } else { // If available, denote the result roundId := id.Round(roundReport.RoundInfo.ID) @@ -166,7 +168,6 @@ func (c *Client) getRoundResults(roundList []id.Round, timeout time.Duration, } else { roundsResults[roundId] = Failed allRoundsSucceeded = false - } } } -- GitLab