1
0
Fork 1
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:
carbotaniuman 2021-03-07 22:00:31 -06:00
parent 44355229ce
commit a7792aca00

View file

@ -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);