diff --git a/core/src/main/kotlin/dev/hotwire/core/turbo/session/Session.kt b/core/src/main/kotlin/dev/hotwire/core/turbo/session/Session.kt index 699c102..78f2c14 100644 --- a/core/src/main/kotlin/dev/hotwire/core/turbo/session/Session.kt +++ b/core/src/main/kotlin/dev/hotwire/core/turbo/session/Session.kt @@ -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 {