Retain LWT

This commit is contained in:
Diogo Gomes 2021-03-29 17:11:35 +01:00 committed by GitHub
parent 5d69f909e5
commit 27704a9aa1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -307,7 +307,7 @@ void mqttStart()
conn_opts.will = &will_opts; conn_opts.will = &will_opts;
conn_opts.will->message = "offline"; conn_opts.will->message = "offline";
conn_opts.will->qos = 1; conn_opts.will->qos = 1;
conn_opts.will->retained = 0; conn_opts.will->retained = 1;
conn_opts.will->topicName = "hasp/plate35/LWT"; conn_opts.will->topicName = "hasp/plate35/LWT";
conn_opts.keepAliveInterval = 20; conn_opts.keepAliveInterval = 20;
@ -376,4 +376,4 @@ void mqttLoop()
void mqttEvery5Seconds(bool wifiIsConnected){}; void mqttEvery5Seconds(bool wifiIsConnected){};
#endif // USE_PAHO #endif // USE_PAHO
#endif // USE_MQTT #endif // USE_MQTT