We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4346355 commit 0c7e668Copy full SHA for 0c7e668
src/main/kotlin/com/github/michaelbull/retry/Retry.kt
@@ -50,10 +50,11 @@ suspend fun <T> retry(
50
while (true) {
51
try {
52
return@withContext block()
53
- } catch (ex: CancellationException) {
54
- /* avoid swallowing CancellationExceptions */
55
- throw ex
56
} catch (t: Throwable) {
+ /* avoid swallowing CancellationExceptions */
+ if (t is CancellationException) {
+ throw t
57
+ }
58
val instruction = RetryFailure(t).policy()
59
60
val status = coroutineContext.retryStatus
0 commit comments