From c103773c19ebec3d502ac03b3f95a48eb6ae8da7 Mon Sep 17 00:00:00 2001 From: Koitharu Date: Fri, 18 Aug 2023 15:19:08 +0300 Subject: [PATCH] Fix handling favicon loading errors --- .../org/koitharu/kotatsu/core/parser/favicon/FaviconFetcher.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/core/parser/favicon/FaviconFetcher.kt b/app/src/main/kotlin/org/koitharu/kotatsu/core/parser/favicon/FaviconFetcher.kt index 911c2703f..f8ec34d49 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/core/parser/favicon/FaviconFetcher.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/core/parser/favicon/FaviconFetcher.kt @@ -20,7 +20,6 @@ import okhttp3.Response import okhttp3.ResponseBody import okhttp3.internal.closeQuietly import okio.Closeable -import okio.IOException import okio.buffer import org.koitharu.kotatsu.core.exceptions.CloudFlareProtectedException import org.koitharu.kotatsu.core.model.MangaSource @@ -62,7 +61,7 @@ class FaviconFetcher( loadIcon(icon.url, mangaSource) } catch (e: CloudFlareProtectedException) { throw e - } catch (e: IOException) { + } catch (e: HttpException) { favicons -= icon continue }