forked from luca/mineqtt
1
0
Fork 0

feat: return error from internet.open

This commit is contained in:
Luca 2024-09-05 17:00:36 +02:00
parent 970c2fa1f3
commit f9b8ecf600
1 changed files with 2 additions and 2 deletions

View File

@ -29,9 +29,9 @@ end
local MqttClient = {}
function mqtt.open (address, port)
local conn = require("internet").open(address, port)
local conn, err = require("internet").open(address, port)
if conn == nil then
return nil, "connection failed"
return nil, err
end
return MqttClient:new(conn), nil