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

demo_game_cluster中gate踢下线的问题 #21

Open
Rayson9418 opened this issue Jan 11, 2024 · 0 comments
Open

demo_game_cluster中gate踢下线的问题 #21

Rayson9418 opened this issue Jan 11, 2024 · 0 comments

Comments

@Rayson9418
Copy link

Rayson9418 commented Jan 11, 2024

在测试gate的websocket连接的时候发现一个踢下线的问题。

问题:同一个用户请求两次路由gate.user.login后,再通过这个函数 agent, ok := pomelo.GetAgentWithUID(userId),无法获取到agent。

场景:已登录建立了websocket连接的用户,再请求这个路由gate.user.login建立新的websocket连接

原因:再次登录时会将之前的agent踢下线(会解绑用户),再重新绑定用户uid。但是踢下线操作比较费时,导致在完成了用户绑定后,又进行了解绑,使得uidMap中的uid被删除了。

规避:
image

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

1 participant