Skip to content

Commit

Permalink
Introduce value timeToExit.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles committed Aug 3, 2020
1 parent d9eecff commit 6fd15c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/core/src/Cardano/Wallet.hs
Expand Up @@ -2155,7 +2155,8 @@ withMinimumExecutionTimeOnFailure minimumExecutionTime action = do
timeAtStart <- liftIO getCurrentTime
lift (runExceptT action) >>= \case
Left failure -> do
waitUntil (minimumExecutionTime `addUTCTime` timeAtStart)
let timeToExit = minimumExecutionTime `addUTCTime` timeAtStart
waitUntil timeToExit
throwE failure
Right result ->
pure result
Expand Down

0 comments on commit 6fd15c1

Please sign in to comment.