fix(mqtt): assigned client id in user-property

This commit is contained in:
Leandro Antônio Farias Machado 2023-05-09 00:40:55 -03:00
parent 33aceeae88
commit 824657ff48

View File

@ -507,7 +507,8 @@ func (s *Server) sendConnack(cl *Client, reason packets.Code, present bool) erro
ServerKeepAliveFlag: true, ServerKeepAliveFlag: true,
ReceiveMaximum: s.Options.Capabilities.ReceiveMaximum, // 3.2.2.3.3 Receive Maximum ReceiveMaximum: s.Options.Capabilities.ReceiveMaximum, // 3.2.2.3.3 Receive Maximum
User: []packets.UserProperty{{Key: "subscribe-topic", Val: "oktopus/v1/agent/" + clUser}}, User: []packets.UserProperty{{Key: "subscribe-topic", Val: "oktopus/v1/agent/" + clUser}},
AssignedClientID: clUser, //AssignedClientID: clUser,
//Device doesn't recognize assigned client id in an attempt of reconnection
} }
if reason.Code >= packets.ErrUnspecifiedError.Code { if reason.Code >= packets.ErrUnspecifiedError.Code {