diff --git a/src/Utils/Failover.hs b/src/Utils/Failover.hs index 3e745b5ed..e8c51dae7 100644 --- a/src/Utils/Failover.hs +++ b/src/Utils/Failover.hs @@ -164,9 +164,7 @@ withFailover' testTarget' f@Failover{..} mode detAcceptable act = withFailoverRe -> fromMaybe (goFirst failover') $ P.next failover' | otherwise -> failover' - where goFirst l = case P.previous l of - Nothing -> l - Just l' -> goFirst l' + where goFirst l = maybe l goFirst $ P.previous l $logDebugS "withFailover'" $ tshow (hashUnique alreadyTested) <> " using item " <> failoverLabel res' <- handleAll (\err -> $logErrorS "withFailover'" (tshow (hashUnique alreadyTested) <> " exception during act or detAcceptable: " <> tshow err) >> recordFailure >> throwM err) $