misc changes
* implement socket timeout error * use 128k buffer size for copy * use NewPipe HTTP user agent in the downloads * automatically recover downloads with network errors that are queued
This commit is contained in:
parent
9656f0486b
commit
d9fb7cb420
16 changed files with 46 additions and 15 deletions
|
|
@ -73,6 +73,7 @@ import static us.shandian.giga.get.DownloadMission.ERROR_POSTPROCESSING_HOLD;
|
|||
import static us.shandian.giga.get.DownloadMission.ERROR_POSTPROCESSING_STOPPED;
|
||||
import static us.shandian.giga.get.DownloadMission.ERROR_PROGRESS_LOST;
|
||||
import static us.shandian.giga.get.DownloadMission.ERROR_SSL_EXCEPTION;
|
||||
import static us.shandian.giga.get.DownloadMission.ERROR_TIMEOUT;
|
||||
import static us.shandian.giga.get.DownloadMission.ERROR_UNKNOWN_EXCEPTION;
|
||||
import static us.shandian.giga.get.DownloadMission.ERROR_UNKNOWN_HOST;
|
||||
|
||||
|
|
@ -487,6 +488,9 @@ public class MissionAdapter extends Adapter<ViewHolder> {
|
|||
case ERROR_PROGRESS_LOST:
|
||||
msg = R.string.error_progress_lost;
|
||||
break;
|
||||
case ERROR_TIMEOUT:
|
||||
msg = R.string.error_timeout;
|
||||
break;
|
||||
default:
|
||||
if (mission.errCode >= 100 && mission.errCode < 600) {
|
||||
msgEx = "HTTP " + mission.errCode;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue