diff --git a/demos/ota/ota_demo_core_http/ota_demo_core_http.c b/demos/ota/ota_demo_core_http/ota_demo_core_http.c index 7fdc25bf11..56ccbc0d8a 100644 --- a/demos/ota/ota_demo_core_http/ota_demo_core_http.c +++ b/demos/ota/ota_demo_core_http/ota_demo_core_http.c @@ -1944,6 +1944,8 @@ static void * otaThread( void * pParam ) /* Calling OTA agent task. */ OTA_EventProcessingTask( pParam ); LogInfo( ( "OTA Agent stopped." ) ); + pthread_detach( pthread_self() ); + pthread_exit( NULL ); return NULL; }