From 8207f6ac320be9a53414334ea580f26f780b13a7 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 62d0fd6454..de6a151311 100644 --- a/components/lwip/apps/ping/ping_sock.c +++ b/components/lwip/apps/ping/ping_sock.c @@ -180,7 +180,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) {