From 67ce97e5235fd024f2dac63675ff08c9bc7b5208 Mon Sep 17 00:00:00 2001 From: Francois BIOT Date: Mon, 17 Apr 2023 01:17:58 +0200 Subject: [PATCH] Removed the bad 5000ms add in timeout detection --- src/TinyMqtt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TinyMqtt.cpp b/src/TinyMqtt.cpp index 5aaf0b3..2f71c55 100644 --- a/src/TinyMqtt.cpp +++ b/src/TinyMqtt.cpp @@ -339,7 +339,7 @@ void MqttClient::clientAlive(uint32_t more_seconds) void MqttClient::loop() { - if (keep_alive && (millis() >= alive - 5000)) + if (keep_alive && (millis() >= alive)) { if (tcp_client && tcp_client->connected()) {