Remove usages of okhttp3.internal to avoid crashes. (#13574)

This commit is contained in:
Alessandro Jean 2022-09-24 23:34:21 -03:00 committed by GitHub
parent 144d9bb004
commit 68e45aa67d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 9 deletions

View File

@ -25,7 +25,6 @@ import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.RequestBody.Companion.toRequestBody
import okhttp3.Response
import okhttp3.internal.closeQuietly
import okio.Buffer
import java.io.IOException
import java.net.URLDecoder
@ -209,7 +208,7 @@ abstract class BilibiliComics(lang: String) : Bilibili(
val refreshTokenResponse = chain.proceed(refreshTokenRequest)
accessTokenCookie = refreshTokenParse(refreshTokenResponse)
refreshTokenResponse.closeQuietly()
refreshTokenResponse.close()
request = request.newBuilder()
.header("Authorization", "Bearer ${accessTokenCookie!!.accessToken}")

View File

@ -5,7 +5,6 @@ import eu.kanade.tachiyomi.network.interceptor.rateLimit
import okhttp3.Interceptor
import okhttp3.OkHttpClient
import okhttp3.Response
import okhttp3.internal.closeQuietly
import java.io.IOException
import java.text.SimpleDateFormat
import java.util.Locale
@ -30,7 +29,7 @@ class MrYaoiFansub : Madara(
return response
}
response.closeQuietly()
response.close()
throw IOException(LOGIN_THROUGH_WEBVIEW_ERROR)
}

View File

@ -18,7 +18,7 @@ class BilibiliGenerator : ThemeSourceGenerator {
baseUrl = "https://www.bilibilicomics.com",
langs = listOf("en", "zh-Hans", "id", "es", "fr"),
className = "BilibiliComicsFactory",
overrideVersionCode = 2
overrideVersionCode = 3
),
SingleLang(
name = "BILIBILI MANGA",

View File

@ -346,7 +346,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("Momo no Hana Scan", "https://momonohanascan.com", "pt-BR", className = "MomoNoHanaScan", overrideVersionCode = 1),
SingleLang("MonarcaManga", "https://monarcamanga.com", "es"),
SingleLang("Mortals Groove", "https://mortalsgroove.com", "en", overrideVersionCode = 1),
SingleLang("MR Yaoi Fansub", "https://mrtenzus.com", "pt-BR", isNsfw = true, className = "MrYaoiFansub"),
SingleLang("MR Yaoi Fansub", "https://mrtenzus.com", "pt-BR", isNsfw = true, className = "MrYaoiFansub", overrideVersionCode = 1),
SingleLang("Muctau", "https://www.bibimanga.com", "en", overrideVersionCode = 2),
SingleLang("MurimScan", "https://murimscan.run", "en", isNsfw = true),
SingleLang("My Universe Scanlator", "https://muscan.com.br", "pt-BR"),

View File

@ -6,7 +6,7 @@ ext {
extName = 'Manga UP!'
pkgNameSuffix = 'all.mangaup'
extClass = '.MangaUpFactory'
extVersionCode = 2
extVersionCode = 3
}
apply from: "$rootDir/common.gradle"

View File

@ -17,7 +17,6 @@ import okhttp3.Interceptor
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import okhttp3.internal.closeQuietly
import rx.Observable
import uy.kohesive.injekt.injectLazy
@ -169,7 +168,7 @@ class MangaUp(override val lang: String) : HttpSource() {
?: title.thumbnailUrl
?: return response
response.closeQuietly()
response.close()
val thumbnailRequest = GET(thumbnailUrl, request.headers)
return chain.proceed(thumbnailRequest)
}