mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-16 06:56:24 +00:00
Replaced deprecated functionality
This commit is contained in:
parent
65e6eb06f2
commit
12409713eb
@ -91,10 +91,14 @@ public void close() throws Exception {
|
||||
}
|
||||
|
||||
public InetSocketAddress start() throws Exception {
|
||||
if (http1Config == null) {
|
||||
return server.start(httpProcessor, exchangeHandlerDecorator, h2Config);
|
||||
if (http1Config != null) {
|
||||
server.configure(http1Config);
|
||||
} else {
|
||||
server.configure(h2Config);
|
||||
}
|
||||
return server.start(httpProcessor, exchangeHandlerDecorator, http1Config);
|
||||
server.configure(exchangeHandlerDecorator);
|
||||
server.configure(httpProcessor);
|
||||
return server.start();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -60,7 +60,10 @@ public void shutdown(final CloseMode closeMode) {
|
||||
}
|
||||
|
||||
public InetSocketAddress start() throws IOException {
|
||||
server.start(http1Config, httpProcessor, exchangeHandlerDecorator);
|
||||
server.configure(http1Config);
|
||||
server.configure(exchangeHandlerDecorator);
|
||||
server.configure(httpProcessor);
|
||||
server.start();
|
||||
return new InetSocketAddress(server.getInetAddress(), server.getPort());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user