-
Notifications
You must be signed in to change notification settings - Fork 678
Open
Description
当接收到连接时,
public static void addClientConnection(ChannelHandlerContext c) {
//fixme 之后重复登录需要踢掉原来的连接
ClientConnection conn = new ClientConnection(c);
if(ClientConnectionMap.allClientMap.putIfAbsent(conn.getNetId(), conn) != null) {
logger.error("Duplicated netid");
}
}
这里什么case会 != null呢 ? 因为每次都是new 一个新的Connection ,然后id会incrementAndGet
另外如果重复登录要踢掉原来的连接,如何知道是重复登录呢?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels