From a1aedce59ed829ef879de015b2c58c2d1c8a896c Mon Sep 17 00:00:00 2001 From: lumapu Date: Mon, 27 Mar 2023 15:10:29 +0200 Subject: [PATCH] small improvement, MQTT --- src/platformio.ini | 3 ++- src/publisher/pubMqtt.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/platformio.ini b/src/platformio.ini index 4e2e92fd..179a9fd8 100644 --- a/src/platformio.ini +++ b/src/platformio.ini @@ -48,7 +48,8 @@ lib_deps = platform = espressif8266 board = esp12e board_build.f_cpu = 80000000L -build_flags = -D RELEASE -Wl,-Map,output.map +build_flags = -D RELEASE + ;-Wl,-Map,output.map monitor_filters = ;default ; Remove typical terminal control codes from input ;time ; Add timestamp with milliseconds for each new line diff --git a/src/publisher/pubMqtt.h b/src/publisher/pubMqtt.h index 7629f96a..b008d8d2 100644 --- a/src/publisher/pubMqtt.h +++ b/src/publisher/pubMqtt.h @@ -101,7 +101,7 @@ class PubMqtt { if (mIntervalTimeout > 0) mIntervalTimeout--; - if(!mClient.connected()) { + if(mClient.disconnected()) { mClient.connect(); return; // next try in a second }