Replaced deprecated functionality

This commit is contained in:
Oleg Kalnichevski 2024-09-12 15:13:08 +02:00
parent 65e6eb06f2
commit 12409713eb
2 changed files with 11 additions and 4 deletions

View File

@ -91,10 +91,14 @@ public class TestAsyncServer {
} }
public InetSocketAddress start() throws Exception { public InetSocketAddress start() throws Exception {
if (http1Config == null) { if (http1Config != null) {
return server.start(httpProcessor, exchangeHandlerDecorator, h2Config); server.configure(http1Config);
} else {
server.configure(h2Config);
} }
return server.start(httpProcessor, exchangeHandlerDecorator, http1Config); server.configure(exchangeHandlerDecorator);
server.configure(httpProcessor);
return server.start();
} }
} }

View File

@ -60,7 +60,10 @@ public class TestServer {
} }
public InetSocketAddress start() throws IOException { 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()); return new InetSocketAddress(server.getInetAddress(), server.getPort());
} }