Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Qi-Zhen-xin committed May 21, 2024
1 parent d62c5f0 commit 31cc358
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ public class ConnectHandler {
public void execute(ReqMessage reqMessage, ChannelHandlerContext ctx) {
User user =
JSONUtil.toBean(stringRedisTemplate.opsForValue().get(RedisConstant.LOGIN_PREFIX + reqMessage.getToken()), User.class);
if (!reqMessage.getFromId().equals(user.getId())) {
if (!user.getId().equals(reqMessage.getFromId())) {
ctx.channel().writeAndFlush(RspMessage.getSystemTextFrame("token有误"));

OnlineUserHolder.removeChannel(ctx);
return;
}
Expand Down

0 comments on commit 31cc358

Please sign in to comment.