Fix handling favicon loading errors

This commit is contained in:
Koitharu
2023-08-18 15:19:08 +03:00
parent 0a28f131ee
commit c103773c19

View File

@@ -20,7 +20,6 @@ import okhttp3.Response
import okhttp3.ResponseBody import okhttp3.ResponseBody
import okhttp3.internal.closeQuietly import okhttp3.internal.closeQuietly
import okio.Closeable import okio.Closeable
import okio.IOException
import okio.buffer import okio.buffer
import org.koitharu.kotatsu.core.exceptions.CloudFlareProtectedException import org.koitharu.kotatsu.core.exceptions.CloudFlareProtectedException
import org.koitharu.kotatsu.core.model.MangaSource import org.koitharu.kotatsu.core.model.MangaSource
@@ -62,7 +61,7 @@ class FaviconFetcher(
loadIcon(icon.url, mangaSource) loadIcon(icon.url, mangaSource)
} catch (e: CloudFlareProtectedException) { } catch (e: CloudFlareProtectedException) {
throw e throw e
} catch (e: IOException) { } catch (e: HttpException) {
favicons -= icon favicons -= icon
continue continue
} }