From 292ef5bac75d86bad343e36495ac68255254416c Mon Sep 17 00:00:00 2001 From: Niek van der Maas Date: Sat, 9 Nov 2019 00:00:52 +0100 Subject: [PATCH] mqtt: Arduino-MQTT setWill parameters order (#1978) The correct order of parameters is: topic, payload, retained, QoS --- code/espurna/mqtt.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/espurna/mqtt.ino b/code/espurna/mqtt.ino index d5777e0b..d2e149a7 100644 --- a/code/espurna/mqtt.ino +++ b/code/espurna/mqtt.ino @@ -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));