Always close response body

This commit is contained in:
len
2016-04-19 14:08:35 +02:00
parent 447dfd1e3c
commit 9213fc6999
3 changed files with 12 additions and 12 deletions
@@ -202,9 +202,9 @@ class ChapterCache(private val context: Context) {
diskCache.flush()
editor.commit()
} catch (e: Exception) {
response.body().close()
throw IOException("Unable to save image")
} finally {
response.body().close()
editor?.abortUnlessCommitted()
}
}