Skip to content

Commit

Permalink
Merge pull request #323 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 committed Mar 23, 2024
2 parents a70e702 + 3bf26ca commit bb636d6
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -783,10 +783,12 @@ class TurboSession 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 bb636d6

Please sign in to comment.