Skip to content

Commit

Permalink
Replaced deprecated functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
ok2c committed Sep 12, 2024
1 parent 65e6eb0 commit 1240971
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down

0 comments on commit 1240971

Please sign in to comment.