Browse Source

Force MQTT close client before reconnecting. Revert back to latest ESPAsyncTCP

fastled
Xose Pérez 7 years ago
parent
commit
252bcbdded
2 changed files with 3 additions and 1 deletions
  1. +2
    -0
      code/espurna/mqtt.ino
  2. +1
    -1
      code/platformio.ini

+ 2
- 0
code/espurna/mqtt.ino View File

@ -131,6 +131,8 @@ void mqttConnect() {
if (!mqtt.connected()) { if (!mqtt.connected()) {
mqtt.disconnect();
char * host = strdup(getSetting("mqttServer", MQTT_SERVER).c_str()); char * host = strdup(getSetting("mqttServer", MQTT_SERVER).c_str());
if (strlen(host) == 0) return; if (strlen(host) == 0) return;
unsigned int port = getSetting("mqttPort", MQTT_PORT).toInt(); unsigned int port = getSetting("mqttPort", MQTT_PORT).toInt();


+ 1
- 1
code/platformio.ini View File

@ -9,7 +9,7 @@ lib_deps =
Adafruit Unified Sensor Adafruit Unified Sensor
https://github.com/xoseperez/Time https://github.com/xoseperez/Time
ArduinoJson ArduinoJson
https://github.com/me-no-dev/ESPAsyncTCP#e074eaac
ESPAsyncTCP
ESPAsyncWebServer ESPAsyncWebServer
https://github.com/marvinroger/async-mqtt-client https://github.com/marvinroger/async-mqtt-client
Embedis Embedis


Loading…
Cancel
Save