Commit a01bd0c0 authored by Administrator's avatar Administrator

udpate

parent a75f3e07
......@@ -79,7 +79,11 @@ public class G4ProxyClient {
private volatile boolean isConnecting = false;
void forceReconnect() {
Channel channelCopy = natChannel;
natChannel = null;
if (channelCopy.isActive()) {
channelCopy.close();
}
connectNatServer();
}
......
......@@ -195,7 +195,8 @@ public class NatServerChannelHandler extends SimpleChannelInboundHandler<NatMess
NatClientImage client = clientManager.getClient(clientId);
Channel natChannel1 = client.getNatChannel();
if (natChannel == natChannel1) {
log.info("the nat channel InActive ,close ");
//nat channel 断开,需要关闭mapping port
log.info("the nat channel InActive ,close mapping port ");
client.getUserMappingServerChannel().close();
}
......
......@@ -40,6 +40,7 @@ public class ClientManager {
Channel userMappingServerChannel = userMappingServerChannels.get(mappingPort);
if (userMappingServerChannel == null || !userMappingServerChannel.isActive()) {
log.info("re open mapping port: {}", mappingPort);
ChannelFuture channelFuture = userMappingBootstrap.bind(mappingPort);
try {
channelFuture.get();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment