mirror of
https://gitlab.com/mangadex-pub/mangadex_at_home.git
synced 2024-01-19 02:48:37 +00:00
Fix exception
This commit is contained in:
parent
44355229ce
commit
a7792aca00
|
@ -40,19 +40,23 @@ public class CachingInputStream extends ProxyInputStream {
|
|||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
if (read() == EOF) {
|
||||
try {
|
||||
in.close();
|
||||
} catch (IOException ignored) {
|
||||
}
|
||||
try {
|
||||
cache.close();
|
||||
} catch (IOException ignored) {
|
||||
}
|
||||
onClose.run();
|
||||
try {
|
||||
if (read() == EOF) {
|
||||
try {
|
||||
in.close();
|
||||
} catch (IOException ignored) {
|
||||
}
|
||||
try {
|
||||
cache.close();
|
||||
} catch (IOException ignored) {
|
||||
}
|
||||
onClose.run();
|
||||
|
||||
return;
|
||||
return;
|
||||
}
|
||||
} catch (IOException ignored) {
|
||||
}
|
||||
|
||||
executor.submit(() -> {
|
||||
try {
|
||||
IOUtils.copy(in, cache);
|
||||
|
|
Loading…
Reference in a new issue