Skip to content

Commit

Permalink
use command timeout for select
Browse files Browse the repository at this point in the history
  • Loading branch information
256dpi committed Apr 19, 2018
1 parent 9def48e commit 7635c25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions esp_mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ static void esp_mqtt_process(void *p) {
// acquire select mutex
ESP_MQTT_LOCK_SELECT();

// block until data is available (max 1s)
// block until data is available
bool available = false;
lwmqtt_err_t err = esp_lwmqtt_network_select(&esp_mqtt_network, &available, 1000);
lwmqtt_err_t err = esp_lwmqtt_network_select(&esp_mqtt_network, &available, esp_mqtt_command_timeout);
if (err != LWMQTT_SUCCESS) {
ESP_LOGE(ESP_MQTT_LOG_TAG, "esp_lwmqtt_network_select: %d", err);
ESP_MQTT_UNLOCK_SELECT();
Expand Down

0 comments on commit 7635c25

Please sign in to comment.