throw writeexecption in downloader if flush fails
This commit is contained in:
parent
e402348f9b
commit
161fdf7340
|
@ -304,16 +304,14 @@ public class HttpDownloadConnection implements Transferable {
|
||||||
throw new CancellationException();
|
throw new CancellationException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
os.flush();
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new WriteException();
|
||||||
|
}
|
||||||
} catch (CancellationException | IOException e) {
|
} catch (CancellationException | IOException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} finally {
|
} finally {
|
||||||
if (os != null) {
|
|
||||||
try {
|
|
||||||
os.flush();
|
|
||||||
} catch (final IOException ignored) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FileBackend.close(os);
|
FileBackend.close(os);
|
||||||
FileBackend.close(is);
|
FileBackend.close(is);
|
||||||
wakeLock.release();
|
wakeLock.release();
|
||||||
|
|
Loading…
Reference in New Issue