Skip to content

Commit 4a2a2f2

Browse files
committed
mqtt: use global retain flag for status
resolve #2616
1 parent 46f4eef commit 4a2a2f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/espurna/mqtt.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1640,7 +1640,7 @@ const char* mqttPayloadStatus(bool status) {
16401640
}
16411641

16421642
void mqttSendStatus() {
1643-
mqttSendRaw(_mqtt_settings.will.c_str(), _mqtt_payload_online.c_str(), true);
1643+
mqttSendRaw(_mqtt_settings.will.c_str(), _mqtt_payload_online.c_str(), _mqtt_settings.retain);
16441644
}
16451645

16461646
// -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)