Merge branch 'bugfix/ping_zero_interval_cause_to_assert_reset' into 'master'

lw-ip: Fixed ping assert reset when ping interval is 0

See merge request espressif/esp-idf!12072
This commit is contained in:
David Čermák 2021-01-26 23:27:31 +08:00
commit 8a1adf200e

View File

@ -180,8 +180,10 @@ static void esp_ping_thread(void *args)
ep->on_ping_timeout((esp_ping_handle_t)ep, ep->cb_args); ep->on_ping_timeout((esp_ping_handle_t)ep, ep->cb_args);
} }
} }
if (pdMS_TO_TICKS(ep->interval_ms)) {
vTaskDelayUntil(&last_wake, pdMS_TO_TICKS(ep->interval_ms)); // to get a more accurate delay vTaskDelayUntil(&last_wake, pdMS_TO_TICKS(ep->interval_ms)); // to get a more accurate delay
} }
}
/* batch of ping operations finished */ /* batch of ping operations finished */
if (ep->on_ping_end) { if (ep->on_ping_end) {
ep->on_ping_end((esp_ping_handle_t)ep, ep->cb_args); ep->on_ping_end((esp_ping_handle_t)ep, ep->cb_args);