Skip to content

Commit

Permalink
🔥 Remove hardcoded keepalive - fix #301 (#314)
Browse files Browse the repository at this point in the history
Remove hardcoded KeepAlive for MQTT connection.
Default value of 15sec is already present in AsyncMQTT library
  • Loading branch information
bertmelis authored and marvinroger committed Mar 10, 2017
1 parent f8c4f36 commit 13e1cfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Homie/Boot/BootNormal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ void BootNormal::setup() {
Interface::get().getMqttClient().onPublish(std::bind(&BootNormal::_onMqttPublish, this, std::placeholders::_1));

Interface::get().getMqttClient().setServer(Interface::get().getConfig().get().mqtt.server.host, Interface::get().getConfig().get().mqtt.server.port);
Interface::get().getMqttClient().setKeepAlive(10).setMaxTopicLength(MAX_MQTT_TOPIC_LENGTH);
Interface::get().getMqttClient().setMaxTopicLength(MAX_MQTT_TOPIC_LENGTH);
_mqttClientId = std::unique_ptr<char[]>(new char[strlen(Interface::get().brand) + 1 + strlen(Interface::get().getConfig().get().deviceId) + 1]);
strcpy(_mqttClientId.get(), Interface::get().brand);
strcat_P(_mqttClientId.get(), PSTR("-"));
Expand Down

0 comments on commit 13e1cfd

Please sign in to comment.