-
Notifications
You must be signed in to change notification settings - Fork 220
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
如何有重复id登录,是否有选项舍弃之前的id,而不是新的id自动拒绝? #203
Comments
其实目前的逻辑就是舍弃旧的,具体可以看看 Lines 342 to 499 in a28cd4f
oldSession, err = srv.lockDuplicatedID(client)
|
那为啥每次会报错 login with duplated id,然后客户端就掉线了 |
掉线的是旧的,会与新连接建立会话。正常是这样的才对。我刚测试了一下,好像没啥问题 |
@jiennyx shamblett/mqtt_client#460 (comment) 你这么一说,似乎有点道理,似乎好像是 我用client_id 5566 一开始链接了,然后如果服务端似乎有一个链接缓存,再次以5566 链接的时候,它就会断开老的,但是由于实际上老的就是本次的链接,所以表现为我一连上,立马就断开了。 可以这么理解吗? |
@luohao123 不太理解 2023-11-15T16:34:17.030+0800 INFO server/server.go:327 logging w 2023-11-15T16:34:17.031+0800 WARN server/client.go:274 connectio 2023-11-15T16:34:17.031+0800 INFO server/server.go:599 logged ou 2023-11-15T16:34:17.032+0800 INFO server/server.go:492 logged in
|
如何有重复id登录,是否有选项舍弃之前的id,而不是新的id自动拒绝?
The text was updated successfully, but these errors were encountered: