mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-06 13:27:55 +08:00
【fix】修复流量计费bug
This commit is contained in:
parent
a5a832aa1d
commit
4f58a675d0
@ -75,9 +75,11 @@ public class NettyClientPermeateClientVisitorHandler extends SimpleChannelInboun
|
||||
|
||||
// 使用访客的通信通道
|
||||
Integer visitorPort = internalNetworkClientPermeateClientVisitor.getVisitorPort();
|
||||
String clientId = internalNetworkClientPermeateClientVisitor.getNettyClientProperties().getClientId();
|
||||
NettyProxyMsg nettyProxyMsg = new NettyProxyMsg();
|
||||
nettyProxyMsg.setType(MessageType.REPORT_CLIENT_TRANSFER_CLIENT_REQUEST);
|
||||
nettyProxyMsg.setVisitorId(visitorId);
|
||||
nettyProxyMsg.setClientId(clientId);
|
||||
nettyProxyMsg.setVisitorPort(visitorPort);
|
||||
nettyProxyMsg.setData(bytes);
|
||||
nextChannel.writeAndFlush(nettyProxyMsg);
|
||||
|
@ -74,9 +74,11 @@ public class NettyClientPermeateServerVisitorHandler extends SimpleChannelInboun
|
||||
|
||||
// 使用访客的通信通道
|
||||
Integer visitorPort = internalNetworkPermeateServerVisitor.getVisitorPort();
|
||||
String clientId = internalNetworkPermeateServerVisitor.getNettyClientProperties().getClientId();
|
||||
NettyProxyMsg nettyProxyMsg = new NettyProxyMsg();
|
||||
nettyProxyMsg.setType(MessageType.REPORT_CLIENT_TRANSFER);
|
||||
nettyProxyMsg.setVisitorId(visitorId);
|
||||
nettyProxyMsg.setClientId(clientId);
|
||||
nettyProxyMsg.setVisitorPort(visitorPort);
|
||||
nettyProxyMsg.setData(bytes);
|
||||
nextChannel.writeAndFlush(nettyProxyMsg);
|
||||
|
@ -101,11 +101,7 @@ public class NettyClientPermeateServerVisitorTransferSocket {
|
||||
|
||||
|
||||
} else {
|
||||
log.info("每隔2s重连....");
|
||||
// 离线
|
||||
channel.eventLoop().schedule(() -> {
|
||||
newTransferConnect2Server(internalNetworkPermeateServerVisitor);
|
||||
}, 2, TimeUnit.SECONDS);
|
||||
log.info("客户端渗透服务端通信通道中断....");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user