Comments (5)
@caixingke 😊谢谢提醒,是我没考虑周到,明天修复么么哒
from rxdownload.
对了, 代码中这么处理:
try {
try {
...
} finally {
Utils.close(record);
Utils.close(recordChannel);
Utils.close(save);
Utils.close(saveChannel);
Utils.close(inStream);
Utils.close(response);
}
} catch (IOException e) {
Log.i(TAG, Thread.currentThread().getName() + " download failed or cancel!");
emitter.onError(e);
}
比如, 在 record 流关闭失败时, 是不是会导致 save / inStream / response 等流没有进行关闭?
所以建议流的关闭还是这样子进行:
try {
} catch (IOException e) {
...
} finally {
try {
Utils.close(record);
} catch (IOException e) {
}
一个流一个流进行关闭
}
from rxdownload.
还有一个, FileHelper.createDirectories
中的 file.mkdir()
是否需要改为file.mkdirs()
?
from rxdownload.
@caixingke 哈哈, 谢谢大神指点.
from rxdownload.
@caixingke 新版本已经修复了这几个问题, 谢谢大神
from rxdownload.
Related Issues (20)
- Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. HOT 2
- Provide better Error messages
- 下载异常stream was reset: PROTOCOL_ERROR HOT 1
- How to sort list by it's download time? HOT 1
- How to delete single item from recorder database ?
- 大佬什么时候能升级rxjava3.0 HOT 1
- download keep suspending on download multiple files. HOT 1
- 配置文件都是同一个URL,所以每次不管有没有更新都识别为同一个文件,有办法关闭这个缓存吗? HOT 3
- 有时候会出现:FATAL EXCEPTION: RxCachedThreadScheduler-3 HOT 3
- Downloading files bigger than 15 mb doesn't seem to work on lower-end devices HOT 3
- UndeliverableException due to SocketException when cancel the download
- how to restart a download task with the same url after delete it
- It always timeout when I download AWS CDN resources with RxDownload4 HOT 4
- how to change request in rxdownload HOT 2
- download a large file with slow internet connection (for example GPRS) returns TimeoutException HOT 2
- 频繁点击清空缓存、下载出现崩溃,报错Fatal signal 7 (SIGBUS), code 2 (BUS_ADRERR) HOT 2
- 最大下载数限制设置未生效? HOT 7
- 删除后没有删除记录
- rxjava java.io.IOException: File name too long HOT 2
- 请问怎么修改 才能支持https 请求 HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxdownload.