Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

上传文件时,调用request.cancle()无法取消上传 #6

Closed
jonyhunter opened this issue Apr 24, 2016 · 1 comment
Closed

上传文件时,调用request.cancle()无法取消上传 #6

jonyhunter opened this issue Apr 24, 2016 · 1 comment

Comments

@jonyhunter
Copy link

已测试,确实存在上传无法取消的问题,复现方法很简单,只需在sample项目中的上传代码中增加取消下载功能即可,经测试,在上传过程中,调用Request.cancle(),Request.cancelBySign(),RequestQueue.cancelBySign()以及RequestQueue.cancelAll()均无法停止上传,OnUploadListener中的回调方法依然会被调用,跪求 @Y0Landa 大神解决。测试系统为Android5.1.1,测试设备为Google Nexus 9。

@yanzhenjie
Copy link
Owner

你好,取消请求是指取消队列中的请求,如果请求已经在执行了是无法取消的,将在新版本中迭代优化这个功能。上传文件是允许取消的,目前NoHttp提供的Binary的默认实现FileBinary有一个cancel(true)方法,调用后可以取消这个文件的上传。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants