fix: typos and wrong numbers
This commit is contained in:
parent
67e9e50339
commit
c0b86c7659
6
mqtt.lua
6
mqtt.lua
|
@ -69,7 +69,7 @@ function MqttClient:handle ()
|
||||||
return err
|
return err
|
||||||
end
|
end
|
||||||
|
|
||||||
local ptype, length, _ = string.unpack("B B", s)
|
local ptype, length, _ = string.unpack("B B", data)
|
||||||
|
|
||||||
local length, err = self.conn:readVarint(length)
|
local length, err = self.conn:readVarint(length)
|
||||||
if err ~= nil then
|
if err ~= nil then
|
||||||
|
@ -127,8 +127,8 @@ function MqttClient:connect (username, password)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local length = 15
|
local length = 13
|
||||||
local flags = 1
|
local flags = 2
|
||||||
if username ~= nil then
|
if username ~= nil then
|
||||||
length = length + 2 + #username
|
length = length + 2 + #username
|
||||||
flags = flags | 0x80
|
flags = flags | 0x80
|
||||||
|
|
Loading…
Reference in New Issue