Bug 880737 - Cancel retry timer while pausing OTA download. r=bbondy

This commit is contained in:
Shih-Chiang Chien 2013-06-26 21:35:29 -04:00
parent 506def29fd
commit 2c5d35b0f0

View File

@ -2830,8 +2830,15 @@ UpdateService.prototype = {
* See nsIUpdateService.idl
*/
pauseDownload: function AUS_pauseDownload() {
if (this.isDownloading)
if (this.isDownloading) {
this._downloader.cancel();
} else if (this._retryTimer) {
// Download status is still consider as 'downloading' during retry.
// We need to cancel both retry and download at this stage.
this._retryTimer.cancel();
this._retryTimer = null;
this._downloader.cancel();
}
},
/**