pull/1352/head
gedoor 3 years ago
parent c911bfb9f9
commit 683fc3bef8
  1. 3
      app/src/main/java/io/legado/app/help/http/BackstageWebView.kt

@ -145,11 +145,13 @@ class BackstageWebView(
callback?.onError(e) callback?.onError(e)
} }
mHandler.removeCallbacks(this) mHandler.removeCallbacks(this)
destroy()
return@evaluateJavascript return@evaluateJavascript
} }
if (retry > 30) { if (retry > 30) {
callback?.onError(NoStackTraceException("js执行超时")) callback?.onError(NoStackTraceException("js执行超时"))
mHandler.removeCallbacks(this) mHandler.removeCallbacks(this)
destroy()
return@evaluateJavascript return@evaluateJavascript
} }
retry++ retry++
@ -170,6 +172,7 @@ class BackstageWebView(
} catch (e: Exception) { } catch (e: Exception) {
callback?.onError(e) callback?.onError(e)
} }
destroy()
} }
} }
} }

Loading…
Cancel
Save