From 896efaffb59609a150d7b43a1c8888e1e2b5e99b Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 27 Jul 2022 22:47:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/coroutine/Coroutine.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/help/coroutine/Coroutine.kt b/app/src/main/java/io/legado/app/help/coroutine/Coroutine.kt index cd76aec99..e1565b6be 100644 --- a/app/src/main/java/io/legado/app/help/coroutine/Coroutine.kt +++ b/app/src/main/java/io/legado/app/help/coroutine/Coroutine.kt @@ -146,7 +146,7 @@ class Coroutine( success?.let { dispatchCallback(this, value, it) } } catch (e: Throwable) { e.printOnDebug() - if (e is CancellationException && e !is ActivelyCancelException) { + if (isActive) { this@Coroutine.cancel() } if (e is CancellationException && e !is TimeoutCancellationException) {