Merge branch 'fix/12567-azure-timeout'

This commit is contained in:
David Pilato 2016-01-19 18:02:33 +01:00
commit 725d7f968b

View File

@ -123,7 +123,7 @@ public class AzureStorageServiceImpl extends AbstractLifecycleComponent<AzureSto
// Set timeout option. Defaults to 5mn. See cloud.azure.storage.timeout or cloud.azure.storage.xxx.timeout
try {
int timeout = (int) azureStorageSettings.getTimeout().getMillis();
client.getDefaultRequestOptions().setTimeoutIntervalInMs(timeout);
client.getDefaultRequestOptions().setMaximumExecutionTimeInMs(timeout);
} catch (ClassCastException e) {
throw new IllegalArgumentException("Can not convert [" + azureStorageSettings.getTimeout() +
"]. It can not be longer than 2,147,483,647ms.");