mirror of https://github.com/apache/cloudstack.git
zero size of template/volume being registered causes infinite loop on SSVM,
the fix is if the size is 0, return success without download
This commit is contained in:
parent
a4d428434d
commit
56535a7a83
|
|
@ -250,6 +250,13 @@ public class HttpTemplateDownloader implements TemplateDownloader {
|
|||
}
|
||||
} else {
|
||||
remoteSize2 = Long.parseLong(contentLengthHeader.getValue());
|
||||
if ( remoteSize2 == 0 ) {
|
||||
status = TemplateDownloader.Status.DOWNLOAD_FINISHED;
|
||||
String downloaded = "(download complete remote=" + remoteSize + "bytes)";
|
||||
errorString = "Downloaded " + totalBytes + " bytes " + downloaded;
|
||||
downloadTime = 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (remoteSize == 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue