diff --git a/app/src/main/java/io/legado/app/help/http/BackstageWebView.kt b/app/src/main/java/io/legado/app/help/http/BackstageWebView.kt index 8cfff3e6c..bfcb5dae7 100644 --- a/app/src/main/java/io/legado/app/help/http/BackstageWebView.kt +++ b/app/src/main/java/io/legado/app/help/http/BackstageWebView.kt @@ -145,11 +145,13 @@ class BackstageWebView( callback?.onError(e) } mHandler.removeCallbacks(this) + destroy() return@evaluateJavascript } if (retry > 30) { callback?.onError(NoStackTraceException("js执行超时")) mHandler.removeCallbacks(this) + destroy() return@evaluateJavascript } retry++ @@ -170,6 +172,7 @@ class BackstageWebView( } catch (e: Exception) { callback?.onError(e) } + destroy() } } }