This commit is contained in:
kunfei
2022-07-27 22:42:23 +08:00
parent 9457f38d1b
commit 22d34143d3

View File

@@ -146,7 +146,9 @@ class Coroutine<T>(
success?.let { dispatchCallback(this, value, it) }
} catch (e: Throwable) {
e.printOnDebug()
if (e is ActivelyCancelException) this@Coroutine.cancel()
if (e is CancellationException && e !is ActivelyCancelException) {
this@Coroutine.cancel()
}
if (e is CancellationException && e !is TimeoutCancellationException) {
return@launch
}