Skip to content

Commit 8019ef0

Browse files
committed
Fix OTA_Shutdown() not releasing resources
Related to #1910 Modify `otaThread` function in `demos/ota/ota_demo_core_http/ota_demo_core_http.c` to release resources properly. * Add `pthread_detach(pthread_self());` to detach the thread. * Add `pthread_exit(NULL);` to exit the thread.
1 parent fa50223 commit 8019ef0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

demos/ota/ota_demo_core_http/ota_demo_core_http.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,6 +1944,8 @@ static void * otaThread( void * pParam )
19441944
/* Calling OTA agent task. */
19451945
OTA_EventProcessingTask( pParam );
19461946
LogInfo( ( "OTA Agent stopped." ) );
1947+
pthread_detach(pthread_self());
1948+
pthread_exit(NULL);
19471949
return NULL;
19481950
}
19491951

0 commit comments

Comments
 (0)