mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-16 18:35:05 +08:00
[fix] 规范客户端渗透表信息
This commit is contained in:
@ -3,6 +3,7 @@ package org.framework.lazy.cloud.network.heartbeat.common;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
|
||||
import org.wu.framework.core.utils.ObjectUtils;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
@ -113,6 +114,9 @@ public class ChannelContext {
|
||||
*/
|
||||
public static Channel getLoadBalance(byte[] clientId) {
|
||||
List<Channel> channels = get(clientId);
|
||||
if(ObjectUtils.isEmpty(channels)){
|
||||
return null;
|
||||
}
|
||||
return channels.get(0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user