@@ -161,6 +161,7 @@ private static HttpClient GetHttpClientInstance(Uri URI, int timeout, ArrayList
161161 string key = HttpClientInstanceIdentifier ( proxyHost , proxyPort , fileCertificateCollection , timeout ) ;
162162 if ( _httpClientInstances . TryGetValue ( key , out value ) )
163163 {
164+ GXLogging . Debug ( log , $ "Getting httpClient cached instance") ;
164165 return value ;
165166 }
166167 else
@@ -169,6 +170,7 @@ private static HttpClient GetHttpClientInstance(Uri URI, int timeout, ArrayList
169170 {
170171 if ( _httpClientInstances . TryGetValue ( key , out value ) )
171172 {
173+ GXLogging . Debug ( log , $ "Getting httpClient cached instance") ;
172174 return value ;
173175 }
174176 value = new HttpClient ( GetHandler ( URI , authCollection , authProxyCollection , certificateCollection , proxyHost , proxyPort ) ) ;
@@ -212,10 +214,11 @@ private static SocketsHttpHandler GetHandler(Uri URI, ArrayList authCollection,
212214 PooledConnectionLifetime = TimeSpan . FromMinutes ( POOLED_CONNECTION_LIFETIME_MINUTES ) ,
213215 } ;
214216 int maxConnections = Preferences . GetHttpClientMaxConnectionPerRoute ( ) ;
215- if ( maxConnections != 0 )
217+ if ( maxConnections != Preferences . DEFAULT_HTTPCLIENT_MAX_PER_ROUTE )
216218 {
217219 handler . MaxConnectionsPerServer = maxConnections ;
218220 }
221+ GXLogging . Debug ( log , $ "Creating SocketsHttpHandler MaxConnectionsPerServer:{ handler . MaxConnectionsPerServer } ") ;
219222 handler . Credentials = getCredentialCache ( URI , authCollection ) ;
220223
221224 if ( ServicePointManager . ServerCertificateValidationCallback != null )
0 commit comments