diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-12-05 18:12:50 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-12-05 18:12:50 +0200 |
| commit | 97d65296c4cc85ad62e0cd11e430bdf9d3b1b160 (patch) | |
| tree | 1e384f6478cee7b290bb51a9c2fe65cb903f6c94 /Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate | |
| parent | 9259bc36791a7084ae33bcf0a698101ddb24d28f (diff) | |
| download | Tango-97d65296c4cc85ad62e0cd11e430bdf9d3b1b160.tar.gz Tango-97d65296c4cc85ad62e0cd11e430bdf9d3b1b160.zip | |
Improved PPC cdn integration...
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs index 333fb261d..f00efb22c 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs @@ -331,29 +331,29 @@ namespace Tango.PPC.Common.MachineUpdate UpdateProgress("Downloading software package", "Downloading...", false); - AutoFileDownloader downloader = new AutoFileDownloader(update_response.BlobAddress, update_response.CdnAddress, tempFile); - await downloader.ResolveMode(); - - if (downloader.Mode == AutoFileDownloader.DownloadMode.Standard) - { - LogManager.Log($"Connecting to storage CDN with address {downloader.Address}"); - } - else + using (AutoFileDownloader downloader = new AutoFileDownloader(update_response.BlobAddress, update_response.CdnAddress + "123", tempFile)) { - LogManager.Log($"Connecting to storage blob with address {downloader.Address}"); - } + await downloader.ResolveMode(); - downloader.Progress += (x, e) => - { - UpdateProgress("Downloading software package", "Downloading...", false, e.Current, e.Total); - }; + if (downloader.Mode == AutoFileDownloader.DownloadMode.Standard) + { + LogManager.Log($"Connecting to storage CDN with address {downloader.Address}"); + } + else + { + LogManager.Log($"Connecting to storage blob with address {downloader.Address}"); + } - var size = await downloader.GetFileSize(); - LogManager.Log("Download size: " + size + " bytes."); - LogManager.Log("Starting file download..."); - await downloader.Download(); + downloader.Progress += (x, e) => + { + UpdateProgress("Downloading software package", "Downloading...", false, e.Current, e.Total); + }; - downloader.Dispose(); + var size = await downloader.GetFileSize(); + LogManager.Log("Download size: " + size + " bytes."); + LogManager.Log("Starting file download..."); + await downloader.Download(); + } UpdateProgress("Downloading software package", "Extracting package..."); |
