retryOnFailure

inline fun <T> retryOnFailure(count: Int, action: () -> T): T(source)

Will try to execute action and, if any exception will happen, execution will be retried. This process will happen at most count times. There is no any limits on count value, but action will run at least once and retryOnFailure will return its result if it is successful