From c0d4c604e6a140c0f2967e1b43fd94d0b029c73f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20de=20Giessen?= Date: Tue, 15 Aug 2023 11:34:23 +0200 Subject: [PATCH] esp32/network_ppp: Block after deleting task. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When calling ppp.active(False) we could get a crash due to immediately returning after asking FreeRTOS to delete the current task. This commit adds a simple blocking loop, the same as used in all other places where we call vTaskDelete(NULL). Signed-off-by: Daniƫl van de Giessen --- ports/esp32/network_ppp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/esp32/network_ppp.c b/ports/esp32/network_ppp.c index 8ab502426b4b..ea0dd1706e08 100644 --- a/ports/esp32/network_ppp.c +++ b/ports/esp32/network_ppp.c @@ -114,6 +114,8 @@ static void pppos_client_task(void *self_in) { self->client_task_handle = NULL; vTaskDelete(NULL); + for (;;) { + } } STATIC mp_obj_t ppp_active(size_t n_args, const mp_obj_t *args) {