Skip to content

Commit

Permalink
esp32/network_ppp: Block after deleting task.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
DvdGiessen authored and dpgeorge committed Sep 2, 2023
1 parent 6bd1404 commit c0d4c60
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ports/esp32/network_ppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c0d4c60

Please sign in to comment.