git://git.nikiroo.be
/
fanfix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a72ea8a
)
Download: make sure to close in when caching
author
Niki Roo
<niki@nikiroo.be>
Mon, 22 Apr 2019 10:34:04 +0000
(12:34 +0200)
committer
Niki Roo
<niki@nikiroo.be>
Mon, 22 Apr 2019 10:34:04 +0000
(12:34 +0200)
src/be/nikiroo/utils/Downloader.java
patch
|
blob
|
blame
|
history
diff --git
a/src/be/nikiroo/utils/Downloader.java
b/src/be/nikiroo/utils/Downloader.java
index 1ec4379a92b355cc1261e0d80d2c057dee0ff8ee..30ce4e798aff5300b30e14f200546b1e4d09ef16 100644
(file)
--- a/
src/be/nikiroo/utils/Downloader.java
+++ b/
src/be/nikiroo/utils/Downloader.java
@@
-336,8
+336,11
@@
public class Downloader {
if (in != null && cache != null) {
tracer.trace("Save to cache: " + originalUrl);
try {
- cache.save(in, originalUrl);
- in.close();
+ try {
+ cache.save(in, originalUrl);
+ } finally {
+ in.close();
+ }
in = cache.load(originalUrl, true, false);
} catch (IOException e) {
tracer.error(new IOException(