mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-16 18:35:05 +08:00
【fix】修复服务端socks代理客户端时断时续问题
This commit is contained in:
@ -50,6 +50,7 @@ public class NettySocksServerProxyClientRealHandler extends SimpleChannelInbound
|
||||
// 客户端真实通信通道
|
||||
Channel transferChannel = ChannelAttributeKeyUtils.getNextChannel(ctx.channel());
|
||||
if (transferChannel != null&&transferChannel.isActive()) {
|
||||
log.debug("上报关闭这个客户端的访客通道");
|
||||
// 上报关闭这个客户端的访客通道
|
||||
NettyProxyMsg closeVisitorMsg = new NettyProxyMsg();
|
||||
closeVisitorMsg.setType(ProxyMessageType.SOCKS_REPORT_SERVER_PROXY_CLIENT_TRANSFER_CLOSE_);
|
||||
|
@ -37,8 +37,11 @@ public class NettySocksServerProxyClientTransferHandler extends SimpleChannelInb
|
||||
String visitorId = ChannelAttributeKeyUtils.getVisitorId(ctx.channel());
|
||||
Channel realChannel = ChannelAttributeKeyUtils.getNextChannel(ctx.channel());
|
||||
log.warn("close server proxy client transfer real clientId:{} visitorId:{}", clientId, visitorId);
|
||||
// 上报关闭当前通道
|
||||
|
||||
// 关闭真实通道
|
||||
if (realChannel != null) {
|
||||
log.debug("关闭真实通道");
|
||||
realChannel.close();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user