<@U5B1XHM88> Coroutines give you the pleasure of s...
# coroutines
u
@frogman544 Coroutines give you the pleasure of sequential coding style. Just wrap your call without retries and then call it inside a loop. Something like this (pseudo code):
Copy code
suspend fun awaitResult(retries: Int) : Result {
  var retriesLeft = retries
  while (retriesLeft-- > 0) {
    var result = awaitResult() // Await result without retries
    if ( !(result is Result.Exception) ) return result 
  }
  return result
}