Skip to content

Commit

Permalink
Fix mqtt topic with ending slash (xoseperez#1755)
Browse files Browse the repository at this point in the history
  • Loading branch information
reaper7 authored and mcspr committed Jun 4, 2019
1 parent 08a4940 commit c5d4a1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/espurna/mqtt.ino
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ void _mqttConfigure() {
// Get base topic and apply placeholders
{
String topic = getSetting("mqttTopic", MQTT_TOPIC);
if (topic.endsWith("/")) topic.remove(_mqtt_topic.length()-1);
if (topic.endsWith("/")) topic.remove(topic.length()-1);

// Replace things inside curly braces (like {hostname}, {mac} etc.)
_mqttPlaceholders(topic);
Expand Down

0 comments on commit c5d4a1f

Please sign in to comment.