public static void applyRequestConfig ( HttpRequestBase httpRequest , PackageFile packageFile , PackageManagerProperties props ) { Integer httpSocketTimeoutSec = packageFile . getHttpSocketTimeoutSec ( ) ; if ( httpSocketTimeoutSec == null ) { return ; } // apply specific timeout settings configured for this package file RequestConfig defaultConfig = buildRequestConfig ( props ) ; httpRequest . setConfig ( RequestConfig . copy ( defaultConfig ) . setSocketTimeout ( httpSocketTimeoutSec * ( int ) DateUtils . MILLIS_PER_SECOND ) . build ( ) ) ; }
Apply timeout configurations that are defined specific for this package file .