Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

本地运行WebSocketSession获取不到用户信息造成空指针 #95

Open
ZephyrJung opened this issue Jul 15, 2024 · 1 comment
Open

Comments

@ZephyrJung
Copy link

描述问题 Describe the problem

本地启动服务,UserChannel、GobangChannel onConnect方法使用如下代码获取用户信息,但返回为空:

final String userStr = session.getHttpSession().getAttribute(User.USER);

导致双开五子棋无法开始,(UserChannel的onConnect看起来不影响)

期待的结果 Expected result

通过webSocketSession获取用户信息(是否是前端代码缺失?后端根据提交记录无变化,前端gobang.ftl似乎做过恢复)

截屏或录像 Screenshot or video

image

版本环境 Version environment

  • 版本 Version:master最新代码
  • 操作系统 Operating system:不涉及
  • 浏览器(如果使用)Browser (if used):Microsoft Edge

其他信息 Other information

@88250
Copy link
Owner

88250 commented Jul 24, 2024

我这没有时间看了,欢迎 PR。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants