From cffcac6106edba0231ddccfbc4ce769563c5b201 Mon Sep 17 00:00:00 2001 From: Chen Wu Date: Tue, 26 Jan 2021 10:20:58 +0800 Subject: [PATCH] lwip: Fixed ping assert reset when ping interval is 0 --- components/lwip/apps/ping/ping_sock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/lwip/apps/ping/ping_sock.c b/components/lwip/apps/ping/ping_sock.c index ced6e2bf3e..63c49405e4 100644 --- a/components/lwip/apps/ping/ping_sock.c +++ b/components/lwip/apps/ping/ping_sock.c @@ -170,7 +170,9 @@ static void esp_ping_thread(void *args) ep->on_ping_timeout((esp_ping_handle_t)ep, ep->cb_args); } } - vTaskDelayUntil(&last_wake, pdMS_TO_TICKS(ep->interval_ms)); // to get a more accurate delay + if (pdMS_TO_TICKS(ep->interval_ms)) { + vTaskDelayUntil(&last_wake, pdMS_TO_TICKS(ep->interval_ms)); // to get a more accurate delay + } } /* batch of ping operations finished */ if (ep->on_ping_end) {