This commit is contained in:
kunfei
2022-07-27 22:48:50 +08:00
parent 896efaffb5
commit 222c26046c

View File

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