Skip to content

Commit

Permalink
Merge pull request #26 from hotwired/ssl-errors
Browse files Browse the repository at this point in the history
Only show error screens for SSL errors when the url matches the current visit
  • Loading branch information
jayohms authored Mar 23, 2024
2 parents 3b0b668 + f76bc3e commit 32d4063
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -778,10 +778,12 @@ class Session internal constructor(
handler.cancel()

val visitError = WebSslError.from(error)
logEvent("onReceivedSslError", "error" to visitError, "url" to error.url)

logEvent("onReceivedSslError", "error" to visitError)
reset()
callback { it.onReceivedError(visitError) }
if (currentVisit?.location == error.url) {
reset()
callback { it.onReceivedError(visitError) }
}
}

override fun onRenderProcessGone(view: WebView, detail: RenderProcessGoneDetail): Boolean {
Expand Down

0 comments on commit 32d4063

Please sign in to comment.