[fix] 通信通道统一绑定客户端ID,访客ID

This commit is contained in:
wujiawei
2024-09-24 21:54:53 +08:00
parent 9784cc65b6
commit 485d0602af
13 changed files with 45 additions and 63 deletions

View File

@ -66,7 +66,7 @@ public class NettyServerHandler extends SimpleChannelInboundHandler<NettyProxyMs
if (ObjectUtils.isEmpty(visitorId)) {
// 关闭这个不活跃的channel client:{}
log.warn("Close this inactive channel client:{} with no visitor", clientId);
log.warn("close this inactive channel client:{} with no visitor", clientId);
// 给所有客户端发送 这个客户端离线了
NettyProxyMsg nettyMsg = new NettyProxyMsg();
nettyMsg.setClientId(clientId);
@ -74,7 +74,7 @@ public class NettyServerHandler extends SimpleChannelInboundHandler<NettyProxyMs
channelTypeAdapter.handler(channel, nettyMsg);
channel.close();
} else {
log.warn("Close visitor: [{}]'s connection", visitorId);
log.warn("close client:{} visitor: [{}]'s connection",clientId, visitorId);
NettyCommunicationIdContext.clear(visitorId);
NettyRealIdContext.clear(visitorId);
// 关闭通信通道