Better MQTT errors
This commit is contained in:
parent
a24e11ef18
commit
35626e13db
@ -77,6 +77,10 @@ function love.update(...)
|
||||
end
|
||||
end
|
||||
|
||||
function love.mqtt.onError(message)
|
||||
print("MQTT error")
|
||||
end
|
||||
|
||||
function love.mqtt.connect(connack)
|
||||
if connack.rc ~= 0 then
|
||||
print("Connection to broker failed:", connack:reason_string())
|
||||
|
@ -58,6 +58,7 @@ local function main()
|
||||
message = onMessage,
|
||||
error = function(message)
|
||||
print("MQTT error: " .. message)
|
||||
call("onError", message)
|
||||
end
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user