Use new JettyClientHttpConnector constructor

Simplify `ClientHttpConnectorConfiguration`by using the recently
introduced `JettyClientHttpConnector` constructor.

See gh-17015
pull/17040/head
Issam El-atif 6 years ago committed by Phillip Webb
parent 898a903d2f
commit 4ac1407af1

@ -78,10 +78,7 @@ class ClientHttpConnectorConfiguration {
JettyResourceFactory jettyResourceFactory) { JettyResourceFactory jettyResourceFactory) {
SslContextFactory sslContextFactory = new SslContextFactory.Client(); SslContextFactory sslContextFactory = new SslContextFactory.Client();
HttpClient httpClient = new HttpClient(sslContextFactory); HttpClient httpClient = new HttpClient(sslContextFactory);
httpClient.setExecutor(jettyResourceFactory.getExecutor()); return new JettyClientHttpConnector(httpClient, jettyResourceFactory);
httpClient.setByteBufferPool(jettyResourceFactory.getByteBufferPool());
httpClient.setScheduler(jettyResourceFactory.getScheduler());
return new JettyClientHttpConnector(httpClient);
} }
} }

Loading…
Cancel
Save