heliosgo

Results 5 comments of heliosgo

其实目前的逻辑就是舍弃旧的,具体可以看看https://github.com/DrmagicE/gmqtt/blob/a28cd4f9adb20d0cb2feee53294d1f0e9d2ae62a/server/server.go#L342-L499 `oldSession, err = srv.lockDuplicatedID(client) `

> 那为啥每次会报错 login with duplated id,然后客户端就掉线了 掉线的是旧的,会与新连接建立会话。正常是这样的才对。我刚测试了一下,好像没啥问题

@luohao123 不太理解 `但是由于实际上老的就是本次的链接,所以表现为我一连上,立马就断开了。` 我贴段日志把,看起来清楚点。 2023-11-15T16:34:17.030+0800 INFO server/server.go:327 logging w ith duplicate ClientID {"remote": "192.168.19.118:61779", "client_id": "mqttx_67fa4d05"} 2023-11-15T16:34:17.031+0800 WARN server/client.go:274 connectio n lost {"client_id": "mqttx_67fa4d05", "remote_addr": "192.168.19.118:61768", "error": "operation error: Code...

It would be better if null/empty values ​​could be ignored. ```golang // goverter:converter type Converter interface { CopyTo(source Input, target *Output, ignoreEmpty ...bool) } type Input struct { Age int...