diff options
| author | Daniël van de Giessen <daniel@dvdgiessen.nl> | 2023-08-15 11:34:23 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-09-02 18:01:03 +1000 |
| commit | c0d4c604e6a140c0f2967e1b43fd94d0b029c73f (patch) | |
| tree | f0a7cc4a30245d2be571737e9cfcc655d3847b62 | |
| parent | 6bd1404225a53bd85b75480146f6fbd1fd438ab9 (diff) | |
esp32/network_ppp: Block after deleting task.
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 <daniel@dvdgiessen.nl>
| -rw-r--r-- | ports/esp32/network_ppp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/esp32/network_ppp.c b/ports/esp32/network_ppp.c index 8ab502426..ea0dd1706 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) { |
