Cancel hosted events before unregistering hosted entity
This commit is contained in:
parent
b7a855c323
commit
556ba2ee6f
1 changed files with 5 additions and 5 deletions
|
@ -370,17 +370,17 @@ static void cotask_finalize(CoTask *task) {
|
|||
|
||||
cancel_task_events(task_data);
|
||||
|
||||
if(task_data->hosted.ent) {
|
||||
ent_unregister(task_data->hosted.ent);
|
||||
task_data->hosted.ent = NULL;
|
||||
}
|
||||
|
||||
if(task_data->hosted.events) {
|
||||
_coevent_array_action(task_data->hosted.num_events, task_data->hosted.events, coevent_cancel);
|
||||
task_data->hosted.events = NULL;
|
||||
task_data->hosted.num_events = 0;
|
||||
}
|
||||
|
||||
if(task_data->hosted.ent) {
|
||||
ent_unregister(task_data->hosted.ent);
|
||||
task_data->hosted.ent = NULL;
|
||||
}
|
||||
|
||||
if(task_data->wait.wait_type == COTASK_WAIT_EVENT) {
|
||||
CoEvent *evt = NOT_NULL(task_data->wait.event.pevent);
|
||||
|
||||
|
|
Loading…
Reference in a new issue