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

agentmgr中存在漏洞 #19

Open
elitiwin opened this issue Nov 21, 2021 · 1 comment
Open

agentmgr中存在漏洞 #19

elitiwin opened this issue Nov 21, 2021 · 1 comment

Comments

@elitiwin
Copy link

我尝试在agentmgr的s.resp.relogin回调方法的player.status=STATUS.LOGIN前面,sleep一小会,然后用两个客户端登录相同的账号,结果是两个账号都登录成功了,生成了两个agent服务。相同账号同时登录的情况应该是存在的,现实服务器开发过程中,这种问题如何避免?

@luopeiyu
Copy link
Owner

hihi,sleep加的地方不对呢,加在设置status之后就不会有问题了。
因为如果状态没变成LOGIN,而发生阻塞,虽然该协程阻塞,但其他协程可以运行,导致通过状态判定。

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