diff --git a/mqtt.lua b/mqtt.lua index 0338cbc..7d42624 100644 --- a/mqtt.lua +++ b/mqtt.lua @@ -43,6 +43,8 @@ function MqttClient:new (conn) self.__index = self conn.read_varint = read_varint + conn:setTimeout(1) + c.conn = conn c.is_connecting = false c.is_connected = false