coolerfall / Android-HttpDownloadManager

An useful and effective http/https download manager for Android, support breakpoint downloading.
https://ahdm.coolerfall.com
Apache License 2.0
200 stars 43 forks source link

fix not re-download when network is not stable #70

Closed taiem92dn closed 5 years ago

taiem92dn commented 5 years ago

When internet is not stable, the file is downloading will be turned to success status. The DownloadManager will let the request to be success but actually it's not.

I have found this bug when testing in poor environment internet. I use Charles to simulate with this setting throtling settings

coolerfall commented 5 years ago

Thanks for your PR. I saw you change the condition with totalBytes, but totalBytes sometimes could not get from header, this will cause error downloading.

taiem92dn commented 5 years ago

I think in that case, it should go to error