diff --git a/examples/BresserWeatherSensorMQTT/BresserWeatherSensorMQTT.ino b/examples/BresserWeatherSensorMQTT/BresserWeatherSensorMQTT.ino index 6dbbea7b..ab1d2770 100644 --- a/examples/BresserWeatherSensorMQTT/BresserWeatherSensorMQTT.ino +++ b/examples/BresserWeatherSensorMQTT/BresserWeatherSensorMQTT.ino @@ -662,6 +662,7 @@ void loop() { Serial.printf("%s: %s\n", mqttPubStatus, "offline"); Serial.flush(); client.publish(mqttPubStatus, "offline", true /* retained */, 0 /* qos */); + client.loop(); client.disconnect(); client.loop(); #ifdef LED_EN