mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2024-12-27 01:01:48 +01:00
probably fixes http leaks (by @Syer10)
This commit is contained in:
parent
d9620bec05
commit
700a739f95
@ -8,6 +8,7 @@ package suwayomi.tachidesk.impl.util.storage
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
|
import okhttp3.internal.closeQuietly
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.FileInputStream
|
import java.io.FileInputStream
|
||||||
import java.io.InputStream
|
import java.io.InputStream
|
||||||
@ -55,6 +56,7 @@ object CachedImageResponse {
|
|||||||
|
|
||||||
return pathToInputStream(fullPath) to imageType
|
return pathToInputStream(fullPath) to imageType
|
||||||
} else {
|
} else {
|
||||||
|
response.closeQuietly()
|
||||||
throw Exception("request error! ${response.code}")
|
throw Exception("request error! ${response.code}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user