Browse Source

mqtt: Arduino-MQTT setWill parameters order (#1978)

The correct order of parameters is: topic, payload, retained, QoS
master
Niek van der Maas 5 years ago
committed by Max Prokhorov
parent
commit
292ef5bac7
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      code/espurna/mqtt.ino

+ 1
- 1
code/espurna/mqtt.ino View File

@ -184,7 +184,7 @@ bool _mqttConnectSyncClient(bool secure = false) {
#if MQTT_LIBRARY == MQTT_LIBRARY_ARDUINOMQTT
_mqtt.begin(_mqtt_server.c_str(), _mqtt_port, _mqttGetClient(secure));
_mqtt.setWill(_mqtt_will.c_str(), _mqtt_payload_offline.c_str(), _mqtt_qos, _mqtt_retain);
_mqtt.setWill(_mqtt_will.c_str(), _mqtt_payload_offline.c_str(), _mqtt_retain, _mqtt_qos);
result = _mqtt.connect(_mqtt_clientid.c_str(), _mqtt_user.c_str(), _mqtt_pass.c_str());
#elif MQTT_LIBRARY == MQTT_LIBRARY_PUBSUBCLIENT
_mqtt.setClient(_mqttGetClient(secure));


Loading…
Cancel
Save