mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-09 13:07:03 +03:00
terminate correctly statically created tasks
This commit is contained in:
@@ -305,6 +305,7 @@ void rtp_end(rtp_t *ctx)
|
||||
ctx->running = false;
|
||||
#ifdef WIN32
|
||||
pthread_join(ctx->thread, NULL);
|
||||
#else
|
||||
xTaskNotifyWait(0, 0, NULL, portMAX_DELAY);
|
||||
vTaskDelete(ctx->thread);
|
||||
free(ctx->xStack);
|
||||
@@ -709,7 +710,7 @@ static void *rtp_thread_func(void *arg) {
|
||||
|
||||
free(packet);
|
||||
LOG_INFO("[%p]: terminating", ctx);
|
||||
|
||||
|
||||
#ifndef WIN32
|
||||
xTaskNotify(ctx->joiner, 0, eNoAction);
|
||||
vTaskSuspend(NULL);
|
||||
|
||||
Reference in New Issue
Block a user