【fix】 优化代理

This commit is contained in:
wujiawei 2025-04-29 09:15:59 +08:00
parent d8a8b630ae
commit e51ad201de
2 changed files with 4 additions and 4 deletions

View File

@ -34,9 +34,9 @@ public class NettyTcpProxySocketApplicationListener implements SocketApplication
*/
@Override
public void doRunning() throws Exception {
try {
ProtocolProxyProperties.TcpProtocolProxy tcpProtocolProxy = protocolProxyProperties.getTcpProtocolProxy();
Integer tcpProtocolProxyPort = tcpProtocolProxy.getPort();
try {
ServerBootstrap b = new ServerBootstrap();
b.group(bossGroup, workerGroup)
.channel(NioServerSocketChannel.class)
@ -61,7 +61,7 @@ public class NettyTcpProxySocketApplicationListener implements SocketApplication
});
channelFuture.channel().closeFuture().sync();
} catch (Exception e) {
log.error("启动TCP 协议代理 失败", e);
log.error("启动TCP 协议代理 失败,端口:{}", tcpProtocolProxyPort, e);
} finally {
destroy();
// 服务器已关闭

View File

@ -56,7 +56,7 @@ public class NettyTcpServerSocketApplicationListener implements SocketApplicatio
channelFuture.addListener((ChannelFutureListener) channelFuture -> {
// 服务器已启动
log.info("TCP 服务器启动成功");
log.info("TCP 服务器启动成功【{}】",tcpPort);
});
channelFuture.channel().closeFuture().sync();
} catch (Exception e) {