This commit is contained in:
Sebastiaan de Schaetzen 2024-07-14 20:13:44 +02:00
parent d28d55ab4b
commit 8a711fd661
2 changed files with 1 additions and 5 deletions

View File

@ -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))

View File

@ -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