Skip to content

Commit c329777

Browse files
committed
Set mqtt clean sesion to true
1 parent 271283a commit c329777

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

MqttManager/MqttManager.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void MqttManager::setup(std::string mqttServer, std::string mqttPort, std::strin
3434

3535
m_mqttClient.onMessage(onMqttMessage);
3636

37-
m_mqttClient.setCleanSession(false);
37+
m_mqttClient.setCleanSession(true);
3838
m_mqttClient.setCredentials(mqttUsername.c_str(), mqttPassword.c_str());
3939
m_mqttClient.setServer(server, m_mqttPort);
4040

@@ -187,10 +187,8 @@ void MqttManager::loop()
187187
m_checkConnectivityTimer.start(); //restart timer
188188
}
189189

190-
191190
if (m_connected)
192191
{
193-
194192
if (m_deviceStatusInfoTimer.check())
195193
{
196194
this->publishDeviceStatusInfo();

0 commit comments

Comments
 (0)