Skip to content

Commit c74d4f1

Browse files
committed
Merge branch 'bugfix/mqtt_wolfssl' into 'master'
Fix a bug of MQTT when disable WS or WSS See merge request sdk/ESP8266_RTOS_SDK!971
2 parents fff9509 + 2f74b40 commit c74d4f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

components/mqtt/esp-mqtt/mqtt_client.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ esp_err_t esp_mqtt_client_set_uri(esp_mqtt_client_handle_t client, const char *u
406406
client->config->path = create_string(uri + puri.field_data[UF_PATH].off, puri.field_data[UF_PATH].len);
407407
}
408408
if (client->config->path) {
409+
#if MQTT_ENABLE_WSS || MQTT_ENABLE_WS
409410
esp_transport_handle_t trans = esp_transport_list_get_transport(client->transport_list, "ws");
410411
if (trans) {
411412
esp_transport_ws_set_path(trans, client->config->path);
@@ -414,6 +415,7 @@ esp_err_t esp_mqtt_client_set_uri(esp_mqtt_client_handle_t client, const char *u
414415
if (trans) {
415416
esp_transport_ws_set_path(trans, client->config->path);
416417
}
418+
#endif
417419
}
418420

419421
if (puri.field_data[UF_PORT].len) {

0 commit comments

Comments
 (0)