Skip to content

Commit

Permalink
mqtt: use global retain flag for status
Browse files Browse the repository at this point in the history
resolve #2616
  • Loading branch information
mcspr committed Sep 2, 2024
1 parent 46f4eef commit 4a2a2f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/espurna/mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1640,7 +1640,7 @@ const char* mqttPayloadStatus(bool status) {
}

void mqttSendStatus() {
mqttSendRaw(_mqtt_settings.will.c_str(), _mqtt_payload_online.c_str(), true);
mqttSendRaw(_mqtt_settings.will.c_str(), _mqtt_payload_online.c_str(), _mqtt_settings.retain);
}

// -----------------------------------------------------------------------------
Expand Down

0 comments on commit 4a2a2f2

Please sign in to comment.