mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2026-02-04 15:05:54 +08:00
[add] 删除namespace规则
This commit is contained in:
@@ -34,7 +34,7 @@ public class ChannelContext {
|
||||
// 如果服务端已经存在 移除
|
||||
if (cacheClientChannelConcurrentHashMap.containsKey(clientId)) {
|
||||
List<Channel> existChannelList = new ArrayList<>();
|
||||
List<Channel> oldChannels = cacheClientChannelConcurrentHashMap.getOrDefault(clientId, new ArrayList<>());
|
||||
List<Channel> oldChannels = cacheClientChannelConcurrentHashMap.get(clientId);
|
||||
for (Channel existChannel : oldChannels) {
|
||||
if (existChannel != null) {
|
||||
if (existChannel.isActive()) {
|
||||
@@ -48,7 +48,7 @@ public class ChannelContext {
|
||||
existChannelList.add(channel);
|
||||
cacheClientChannelConcurrentHashMap.put(clientId, existChannelList);
|
||||
} else {
|
||||
cacheClientChannelConcurrentHashMap.put(clientId, Collections.synchronizedList(new ArrayList<>(List.of(channel))));
|
||||
cacheClientChannelConcurrentHashMap.putIfAbsent(clientId, Collections.synchronizedList(new ArrayList<>(List.of(channel))));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.nio.charset.StandardCharsets;
|
||||
@Getter
|
||||
public class NettyProxyMsg {
|
||||
// body 长度 type 1 isSsl 1 appKey 4 appSecret 4 clientId 4 originalIp 4 targetIp 4 targetPort 4 visitorPort 4 visitorId 4 data 4
|
||||
public static final int bodyLength = 1 + 1 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4;
|
||||
public static final int bodyLength = 1 + 1 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user