优化
This commit is contained in:
1 parent
f4c1fc9dd4
commit
4efd84fb5e
1 file changed
+1
-1
@@ -146,7 +146,7 @@ class Coroutine<T>(
|
|||||||
success?.let { dispatchCallback(this, value, it) }
|
success?.let { dispatchCallback(this, value, it) }
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
e.printOnDebug()
|
e.printOnDebug()
|
||||||
if (isActive) {
|
if (e is CancellationException && isActive) {
|
||||||
this@Coroutine.cancel()
|
this@Coroutine.cancel()
|
||||||
}
|
}
|
||||||
if (e is CancellationException && e !is TimeoutCancellationException) {
|
if (e is CancellationException && e !is TimeoutCancellationException) {
|
||||||
|
|||||||
Reference in new issue
Block a user