From 970c2fa1f3b84811c776a4786c86b7ade0799d05 Mon Sep 17 00:00:00 2001 From: Luca Date: Thu, 5 Sep 2024 16:59:50 +0200 Subject: [PATCH] feat: set timeout to one second --- mqtt.lua | 2 ++ 1 file changed, 2 insertions(+) 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