8000 esp32/network_ppp: Block after deleting task. · micropython/micropython@c0d4c60 · GitHub
[go: up one dir, main page]

Skip to content

Commit c0d4c60

Browse files
DvdGiessendpgeorge
authored andcommitted
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>
1 parent 6bd1404 commit c0d4c60

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ports/esp32/network_ppp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ static void pppos_client_task(void *self_in) {
114114

115115
self->client_task_handle = NULL;
116116
vTaskDelete(NULL);
117+
for (;;) {
118+
}
117119
}
118120

119121
STATIC mp_obj_t ppp_active(size_t n_args, const mp_obj_t *args) {

0 commit comments

Comments
 (0)
0