diff options
author | Olivier Lamy <olamy@apache.org> | 2013-12-22 12:26:20 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2013-12-22 12:26:20 +0000 |
commit | bd07ace6fb0d709a4fd585f82274e2bc5dc12347 (patch) | |
tree | 2b421e57b9f17241d6fdeef9ca3ed5cd53d9c8a6 /archiva-modules/archiva-web/archiva-rest | |
parent | 1088436a3b04810f92af6f8909d8a13918b3bb1c (diff) | |
download | archiva-bd07ace6fb0d709a4fd585f82274e2bc5dc12347.tar.gz archiva-bd07ace6fb0d709a4fd585f82274e2bc5dc12347.zip |
fix timeout
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1552985 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-rest')
-rw-r--r-- | archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java index 5e83622a0..fd6c1a7ca 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java @@ -171,15 +171,16 @@ public class DefaultRemoteRepositoriesService new WagonFactoryRequest( wagonProtocol, remoteRepository.getExtraHeaders() ).networkProxy( networkProxy ) ); - wagon.setReadTimeout( remoteRepository.getRemoteDownloadTimeout() * 1000 ); - wagon.setTimeout( remoteRepository.getTimeout() * 1000 ); - HttpWagon foo; + // hardcoded value as it's a check of the remote repo connectivity + wagon.setReadTimeout( 4000 ); + wagon.setTimeout( 3000 ); + if ( wagon instanceof AbstractHttpClientWagon ) { HttpConfiguration httpConfiguration = new HttpConfiguration(); HttpMethodConfiguration httpMethodConfiguration = new HttpMethodConfiguration(); httpMethodConfiguration.setUsePreemptive( true ); - httpMethodConfiguration.setReadTimeout( remoteRepository.getRemoteDownloadTimeout() * 1000 ); + httpMethodConfiguration.setReadTimeout( 4000 ); httpConfiguration.setGet( httpMethodConfiguration ); AbstractHttpClientWagon.class.cast( wagon ).setHttpConfiguration( httpConfiguration ); } |