Stuff
This commit is contained in:
parent
d28d55ab4b
commit
8a711fd661
@ -33,9 +33,6 @@ end
|
|||||||
|
|
||||||
-- Receive given amount of data from network connection
|
-- Receive given amount of data from network connection
|
||||||
function luasocket.receive(conn, size)
|
function luasocket.receive(conn, size)
|
||||||
if math.random(0, 100) < 50 then
|
|
||||||
return nil, "timeout"
|
|
||||||
end
|
|
||||||
local ok, err = conn.sock:receive(size)
|
local ok, err = conn.sock:receive(size)
|
||||||
--if ok then
|
--if ok then
|
||||||
-- print(" luasocket.receive good:", size, #ok, require("mqtt.tools").hex(ok))
|
-- print(" luasocket.receive good:", size, #ok, require("mqtt.tools").hex(ok))
|
||||||
|
@ -38,8 +38,7 @@ local function onCommand(command)
|
|||||||
assert(client:subscribe {
|
assert(client:subscribe {
|
||||||
topic = topic
|
topic = topic
|
||||||
})
|
})
|
||||||
print("Subscribed to " .. topic)
|
})
|
||||||
print("Subscribed to " .. topic)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user