From 615aeae0c2fbf062269e19065054b8b3d087cd8e Mon Sep 17 00:00:00 2001 From: David Cermak Date: Fri, 24 Apr 2020 14:26:37 +0200 Subject: [PATCH] docs: Makes clear that publish API could block Closes https://github.com/espressif/esp-idf/issues/5077 --- include/mqtt_client.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/mqtt_client.h b/include/mqtt_client.h index c90b2f7..1b645c7 100644 --- a/include/mqtt_client.h +++ b/include/mqtt_client.h @@ -282,6 +282,9 @@ int esp_mqtt_client_unsubscribe(esp_mqtt_client_handle_t client, const char *top * @brief Client to send a publish message to the broker * * Notes: + * - This API might block for several seconds, either due to network timeout (10s) + * or if publishing payloads longer than internal buffer (due to message + * fragmentation) * - Client doesn't have to be connected to send publish message * (although it would drop all qos=0 messages, qos>1 messages would be enqueued) * - It is thread safe, please refer to `esp_mqtt_client_subscribe` for details