mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 436382 - Resume all resumable downloads before retrying, even for failed/canceled downloads. r=sdwilsh
This commit is contained in:
parent
89a43a453a
commit
ba03b0a120
@ -1660,6 +1660,13 @@ nsDownloadManager::RetryDownload(PRUint32 aID)
|
||||
dl->mDownloadState != nsIDownloadManager::DOWNLOAD_CANCELED)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// If the download has failed and is resumable then we first try resuming it
|
||||
if (dl->mDownloadState == nsIDownloadManager::DOWNLOAD_FAILED && dl->IsResumable()) {
|
||||
rv = dl->Resume();
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return rv;
|
||||
}
|
||||
|
||||
// reset time and download progress
|
||||
dl->SetStartTime(PR_Now());
|
||||
dl->SetProgressBytes(0, -1);
|
||||
|
Loading…
Reference in New Issue
Block a user