probably fixes http leaks (by @Syer10)

This commit is contained in:
Aria Moradi 2021-05-27 22:45:44 +04:30
parent d9620bec05
commit 700a739f95

View File

@ -8,6 +8,7 @@ package suwayomi.tachidesk.impl.util.storage
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
import okhttp3.Response
import okhttp3.internal.closeQuietly
import java.io.File
import java.io.FileInputStream
import java.io.InputStream
@ -55,6 +56,7 @@ object CachedImageResponse {
return pathToInputStream(fullPath) to imageType
} else {
response.closeQuietly()
throw Exception("request error! ${response.code}")
}
}