connect event when connection fails
Tieske opened this issue · 2 comments
Tieske commented
these lines; https://github.com/xHasKx/luamqtt/blob/eacac48e31aa1a58974ef05d76687d8554a33207/mqtt/client.lua#L991:L994
send a "connect" event, when the connection actually fails. Is this intentional or a bug?
xHasKx commented
Yes, because CONNACK packet is received and successfully parsed. Client code have to check the .rc property
Check https://github.com/xHasKx/luamqtt/blob/master/examples/simple.lua#L17
Tieske commented
thx for the clarification