Explorar el Código

lwip: Fixed ping assert reset when ping interval is 0

Chen Wu hace 5 años
padre
commit
cffcac6106
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      components/lwip/apps/ping/ping_sock.c

+ 3 - 1
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) {