fix timeout

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1539888 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-11-08 00:55:15 +00:00
parent 8bb7a7f857
commit a8fc937678
1 changed files with 2 additions and 1 deletions

View File

@ -484,7 +484,8 @@ public class DownloadRemoteIndexTask
}, consumer, null ); }, consumer, null );
try try
{ {
file = httpResponseFuture.get( this.remoteRepository.getTimeout(), TimeUnit.SECONDS ); int timeOut = this.remoteRepository.getRemoteDownloadTimeout();
file = timeOut > 0 ? httpResponseFuture.get( timeOut, TimeUnit.SECONDS ) : httpResponseFuture.get();
} }
catch ( InterruptedException e ) catch ( InterruptedException e )
{ {