Merge branch 'bugfix/mqtt_recv_feed_wdt' into 'master'

fix: mqtt recv cycle feed watchdog when cycle interval is 0

See merge request sdk/ESP8266_RTOS_SDK!705
This commit is contained in:
Dong Heng
2019-01-14 11:28:45 +08:00

View File

@ -18,6 +18,7 @@
#include <stdio.h>
#include <string.h>
#include "esp_log.h"
#include "esp_task_wdt.h"
#include "MQTTClient.h"
static const char *TAG = "mc";
@ -438,6 +439,10 @@ void MQTTRun(void *parm)
while (1) {
TimerCountdownMS(&timer, CONFIG_MQTT_RECV_CYCLE); /* Don't wait too long if no traffic is incoming */
#if CONFIG_MQTT_RECV_CYCLE == 0 /* The smaller cycle, the greater throughput */
esp_task_wdt_reset();
#endif
#if defined(MQTT_TASK)
MutexLock(&c->mutex);
#endif