From a1d5ce3d133833b9271490a37a6b67d0fcb41e40 Mon Sep 17 00:00:00 2001 From: Chris Brind Date: Wed, 13 Apr 2022 19:16:15 +0100 Subject: [PATCH] if an error is detected call stop loading explicitly to avoid getting into weird URL loading loops --- DuckDuckGo/Browser Tab/Model/Tab.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/DuckDuckGo/Browser Tab/Model/Tab.swift b/DuckDuckGo/Browser Tab/Model/Tab.swift index b7020c8439..caaca97041 100644 --- a/DuckDuckGo/Browser Tab/Model/Tab.swift +++ b/DuckDuckGo/Browser Tab/Model/Tab.swift @@ -1060,6 +1060,7 @@ extension Tab: WKNavigationDelegate { } func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) { + webView.stopLoading() if currentDownload != nil && (error as NSError).code == ErrorCodes.frameLoadInterrupted { currentDownload = nil return