From 22d34143d35f9cef027e13ebee6742f2592bf9b4 Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 27 Jul 2022 22:42:23 +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 | 4 +++- 1 file changed, 3 insertions(+), 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 6f4045f37..cd76aec99 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,9 @@ class Coroutine( 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 }