-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
关于 Client Login 的问题 #8
Comments
没太懂什么意思。 Lines 72 to 92 in b6608ad
不存在是返回的 |
你看这里啊,用前缀+userId去查询redis,如果从来没登录过(一次都没有,或者第一次启动系统),那就是空。然后在com.crossoverjie.cim.route.controller.RouteController#login 这个方法中,if(login) 才执行保存路由信息,不然的话就是返回说已经重复登录了。这种情况下逻辑不是有点问题么,我从来没有登录过,为何结果要返回给我说账号已登录? |
我懂你意思了,就是 这是因为之前没考虑重复登录的事就只用了 后面优化为一个枚举提示 |
|
我也遇到这个问题了,启动client提示用户不存在。 |
目前登录失败只会提示
下一版本会优化这个提示。 |
|
我感觉大家的困惑是,如何才能登录呢? |
@huxudong 你用的是我搭的公网服务嘛? 演示环境里目前没有
https://crossoverjie.top/2019/01/02/netty/cim01-started/#%E7%99%BB%E5%BD%95 |
|
那就查看自己的
|
|
这种小问题用 |
不知道我这个文档是否能解决大家的问题,其实很多人应该都是本地跑环境,可能存在redis没有账号缓存,导致不能登录,如图: |
在 client login 的时候,userLogin 方法会向 Route 发送验证登录信息。让人疑惑的事,Route 去 Redis 中检查这个 client 是否存在,在接下来的 if 判断语句中,如果这个 client 不存在,返回的居然是已登录 - -! 这里非常不明白,是个 bug 吗
The text was updated successfully, but these errors were encountered: