Fix deprecations after Reactor Netty upgrade
This commit is contained in:
@@ -138,7 +138,7 @@ public class NettyRSocketServerFactory implements RSocketServerFactory, Configur
|
||||
private ServerTransport<CloseableChannel> createWebSocketTransport() {
|
||||
if (this.resourceFactory != null) {
|
||||
HttpServer httpServer = HttpServer.create().tcpConfiguration((tcpServer) -> tcpServer
|
||||
.runOn(this.resourceFactory.getLoopResources()).addressSupplier(this::getListenAddress));
|
||||
.runOn(this.resourceFactory.getLoopResources()).bindAddress(this::getListenAddress));
|
||||
return WebsocketServerTransport.create(httpServer);
|
||||
}
|
||||
return WebsocketServerTransport.create(getListenAddress());
|
||||
@@ -147,7 +147,7 @@ public class NettyRSocketServerFactory implements RSocketServerFactory, Configur
|
||||
private ServerTransport<CloseableChannel> createTcpTransport() {
|
||||
if (this.resourceFactory != null) {
|
||||
TcpServer tcpServer = TcpServer.create().runOn(this.resourceFactory.getLoopResources())
|
||||
.addressSupplier(this::getListenAddress);
|
||||
.bindAddress(this::getListenAddress);
|
||||
return TcpServerTransport.create(tcpServer);
|
||||
}
|
||||
return TcpServerTransport.create(getListenAddress());
|
||||
|
||||
@@ -155,11 +155,11 @@ public class NettyReactiveWebServerFactory extends AbstractReactiveWebServerFact
|
||||
if (this.resourceFactory != null) {
|
||||
LoopResources resources = this.resourceFactory.getLoopResources();
|
||||
Assert.notNull(resources, "No LoopResources: is ReactorResourceFactory not initialized yet?");
|
||||
server = server.tcpConfiguration(
|
||||
(tcpServer) -> tcpServer.runOn(resources).addressSupplier(this::getListenAddress));
|
||||
server = server
|
||||
.tcpConfiguration((tcpServer) -> tcpServer.runOn(resources).bindAddress(this::getListenAddress));
|
||||
}
|
||||
else {
|
||||
server = server.tcpConfiguration((tcpServer) -> tcpServer.addressSupplier(this::getListenAddress));
|
||||
server = server.tcpConfiguration((tcpServer) -> tcpServer.bindAddress(this::getListenAddress));
|
||||
}
|
||||
if (getSsl() != null && getSsl().isEnabled()) {
|
||||
SslServerCustomizer sslServerCustomizer = new SslServerCustomizer(getSsl(), getHttp2(),
|
||||
|
||||
Reference in New Issue
Block a user