File tree Expand file tree Collapse file tree
httpclient5/src/main/java/org/apache/hc/client5/http/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -779,7 +779,11 @@ protected void addCloseable(final Closeable closeable) {
779779 public CloseableHttpAsyncClient build () {
780780 AsyncClientConnectionManager connManagerCopy = this .connManager ;
781781 if (connManagerCopy == null ) {
782- connManagerCopy = PoolingAsyncClientConnectionManagerBuilder .create ().build ();
782+ final PoolingAsyncClientConnectionManagerBuilder connectionManagerBuilder = PoolingAsyncClientConnectionManagerBuilder .create ();
783+ if (systemProperties ) {
784+ connectionManagerBuilder .useSystemProperties ();
785+ }
786+ connManagerCopy = connectionManagerBuilder .build ();
783787 }
784788
785789 ConnectionKeepAliveStrategy keepAliveStrategyCopy = this .keepAliveStrategy ;
Original file line number Diff line number Diff line change @@ -749,7 +749,11 @@ public CloseableHttpClient build() {
749749 }
750750 HttpClientConnectionManager connManagerCopy = this .connManager ;
751751 if (connManagerCopy == null ) {
752- connManagerCopy = PoolingHttpClientConnectionManagerBuilder .create ().build ();
752+ final PoolingHttpClientConnectionManagerBuilder connectionManagerBuilder = PoolingHttpClientConnectionManagerBuilder .create ();
753+ if (systemProperties ) {
754+ connectionManagerBuilder .useSystemProperties ();
755+ }
756+ connManagerCopy = connectionManagerBuilder .build ();
753757 }
754758 ConnectionReuseStrategy reuseStrategyCopy = this .reuseStrategy ;
755759 if (reuseStrategyCopy == null ) {
You can’t perform that action at this time.
0 commit comments