nvazquez commented on a change in pull request #3731: [WIP DO NOT MERGE] System
VM Template Direct Download Support
URL: https://github.com/apache/cloudstack/pull/3731#discussion_r360876258
##########
File path:
server/src/main/java/org/apache/cloudstack/direct/download/DirectDownloadManagerImpl.java
##########
@@ -320,14 +325,38 @@ private void logUsageEvent(VMTemplateVO template, long
poolId) {
*/
private DirectDownloadCommand
getDirectDownloadCommandFromProtocol(DownloadProtocol protocol, String url,
Long templateId, PrimaryDataStoreTO destPool,
String
checksum, Map<String, String> httpHeaders) {
+ int connectTimeout = DEFAULT_DIRECT_DOWNLOAD_CONNECT_TIMEOUT;
+ int soTimeout = DEFAULT_DIRECT_DOWNLOAD_SOCKET_TIMEOUT;
+ int connectionRequestTimeout =
DEFAULT_DIRECT_DOWNLOAD_CONNECTION_REQUEST_TIMEOUT;
+ if (DownloadProtocol.HTTP.equals(protocol) ||
+ DownloadProtocol.HTTPS.equals(protocol) ||
+ DownloadProtocol.METALINK.equals(protocol)) {
+ try {
+ connectTimeout =
Integer.parseInt(configDao.getValue(DirectDownloadConnectTimeout.key()));
Review comment:
Please do not use this and use the config key value() method
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services