diff --git a/src/mqtt/hasp_mqtt_paho_single.cpp b/src/mqtt/hasp_mqtt_paho_single.cpp index 816b4035..4113eece 100644 --- a/src/mqtt/hasp_mqtt_paho_single.cpp +++ b/src/mqtt/hasp_mqtt_paho_single.cpp @@ -313,7 +313,7 @@ void mqttStart() // } printf("%s %d\n", __FILE__, __LINE__); - mqttEnabled = strlen(mqttServer) > 0 && mqttPort > 0; + mqttEnabled = mqttServer.length() > 0 && mqttPort > 0; if(mqttEnabled) { conn_opts.will = &will_opts;