From 756400de195a5d5d979583b44c9bdc2db2525432 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 6 Apr 2019 15:22:25 +0200 Subject: [PATCH] Attempt to fix MQTT reconnects while keeping good response Attempt to fix MQTT reconnects while keeping good response --- sonoff/xdrv_02_mqtt.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonoff/xdrv_02_mqtt.ino b/sonoff/xdrv_02_mqtt.ino index 28f32c183..8ef49a54a 100644 --- a/sonoff/xdrv_02_mqtt.ino +++ b/sonoff/xdrv_02_mqtt.ino @@ -822,8 +822,8 @@ bool Xdrv02(uint8_t function) if (Settings.flag.mqtt_enabled) { switch (function) { - case FUNC_EVERY_100_MSECOND: // https://github.com/knolleary/pubsubclient/issues/556 - if (MqttIsConnected()) { MqttClient.loop(); } + case FUNC_EVERY_50_MSECOND: // https://github.com/knolleary/pubsubclient/issues/556 + MqttClient.loop(); break; #ifdef USE_WEBSERVER case FUNC_WEB_ADD_BUTTON: