From c4cc36a88f4b2e0651539991b5bb0323d59d609b Mon Sep 17 00:00:00 2001 From: Richie Vos Date: Mon, 3 Apr 2023 21:14:29 -0700 Subject: [PATCH] Remove 5000ms offset from alive check I'm not sure what the 5000 is representing, but having it there breaks connectivity for me. #71 --- src/TinyMqtt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TinyMqtt.cpp b/src/TinyMqtt.cpp index 2a43d89..55966f9 100644 --- a/src/TinyMqtt.cpp +++ b/src/TinyMqtt.cpp @@ -309,7 +309,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()) {