avoid leaking connections
This commit is contained in:
@ -5,7 +5,7 @@ ext {
|
||||
extName = 'AnimePahe'
|
||||
pkgNameSuffix = 'en.animepahe'
|
||||
extClass = '.AnimePahe'
|
||||
extVersionCode = 3
|
||||
extVersionCode = 4
|
||||
libVersion = '12'
|
||||
}
|
||||
|
||||
|
@ -315,7 +315,9 @@ class AnimePahe : AnimeHttpSource() {
|
||||
if (tries > 19) {
|
||||
throw Exception("Failed to extract the stream uri from kwik.")
|
||||
}
|
||||
return content?.header("location").toString()
|
||||
val location = content?.header("location").toString()
|
||||
content?.close()
|
||||
return location
|
||||
}
|
||||
|
||||
private fun decrypt(fullString: String, key: String, v1: Int, v2: Int): String {
|
||||
|
@ -5,7 +5,7 @@ ext {
|
||||
extName = 'Gogoanime'
|
||||
pkgNameSuffix = 'en.gogoanime'
|
||||
extClass = '.GogoAnime'
|
||||
extVersionCode = 11
|
||||
extVersionCode = 12
|
||||
libVersion = '12'
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,9 @@ class GogoAnime : ParsedAnimeHttpSource() {
|
||||
|
||||
private fun videoUrlParse(url: String): String {
|
||||
val noRedirectClient = client.newBuilder().followRedirects(false).build()
|
||||
val videoUrl = noRedirectClient.newCall(GET(url)).execute().header("location")
|
||||
val response = noRedirectClient.newCall(GET(url)).execute()
|
||||
val videoUrl = response.header("location")
|
||||
response.close()
|
||||
return videoUrl ?: url
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user