diff options
author | olivier lamy <olamy@apache.org> | 2016-09-13 10:59:55 +1000 |
---|---|---|
committer | olivier lamy <olamy@apache.org> | 2016-09-13 10:59:55 +1000 |
commit | cae55ace9ff82bf55aec318e237ba9768ccc940f (patch) | |
tree | 886100828f99661dae51513fc7dab343f8e49091 /archiva-modules | |
parent | 6db703ff9d5924069b59a886315196115b28f548 (diff) | |
parent | 02b892796c31000e93ad0727234133a789e9a894 (diff) | |
download | archiva-cae55ace9ff82bf55aec318e237ba9768ccc940f.tar.gz archiva-cae55ace9ff82bf55aec318e237ba9768ccc940f.zip |
Merge branch 'pr/23'
[MRM-1924] merge pull request
Diffstat (limited to 'archiva-modules')
-rw-r--r-- | archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java | 25 |
1 files changed, 22 insertions, 3 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 c3528eb4b..9c0bdd925 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 @@ -64,6 +64,9 @@ public class DefaultRemoteRepositoriesService @Inject private NetworkProxyAdmin networkProxyAdmin; + int checkReadTimeout = 10000; + int checkTimeout = 9000; + @Override public List<RemoteRepository> getRemoteRepositories() throws ArchivaRestServiceException @@ -172,14 +175,14 @@ public class DefaultRemoteRepositoriesService .networkProxy( networkProxy ) ); // hardcoded value as it's a check of the remote repo connectivity - wagon.setReadTimeout( 4000 ); - wagon.setTimeout( 3000 ); + wagon.setReadTimeout( checkReadTimeout ); + wagon.setTimeout( checkTimeout ); if ( wagon instanceof AbstractHttpClientWagon ) { HttpMethodConfiguration httpMethodConfiguration = new HttpMethodConfiguration() // .setUsePreemptive( true ) // - .setReadTimeout( 4000 ); + .setReadTimeout( checkReadTimeout ); HttpConfiguration httpConfiguration = new HttpConfiguration().setGet( httpMethodConfiguration ); AbstractHttpClientWagon.class.cast( wagon ).setHttpConfiguration( httpConfiguration ); } @@ -214,4 +217,20 @@ public class DefaultRemoteRepositoriesService } } + + public int getCheckReadTimeout() { + return checkReadTimeout; + } + + public void setCheckReadTimeout(int checkReadTimeout) { + this.checkReadTimeout = checkReadTimeout; + } + + public int getCheckTimeout() { + return checkTimeout; + } + + public void setCheckTimeout(int checkTimeout) { + this.checkTimeout = checkTimeout; + } } |