Make sure listener DCBs are removed cleanly from the list

As listener DCBs can be added and removed from the polling system multiple
times, the DCBs need to be reset to a clean state when they are removed.
This commit is contained in:
Markus Makela 2016-11-30 09:00:31 +02:00
parent 42eb8add5d
commit 7b8497df7a

View File

@ -3471,6 +3471,11 @@ static void dcb_remove_from_list(DCB *dcb)
}
}
/** Reset the next and tail pointers so that if this DCB is added to the list
* again, it will be in a clean state. */
dcb->thread.next = NULL;
dcb->thread.tail = NULL;
spinlock_release(&all_dcbs_lock[dcb->thread.id]);
}