Actually clean up waiters
This commit is contained in:
parent
4400f8e5bb
commit
b4392db109
7
queue.c
7
queue.c
|
@ -67,7 +67,12 @@ static void queue_destructor(node_t *n) {
|
|||
if (q != NULL) { /* can be NULL if queue_extend was given invalid args */
|
||||
DECREF(q->name, sexp_destructor);
|
||||
DECREF(q->backlog_q, sexp_destructor);
|
||||
/* q->waiter_q will be automatically destroyed as part of the destruction of q->subscriptions */
|
||||
{
|
||||
subscription_t *sub = NULL;
|
||||
while ((sub = dequeue(&q->waiter_q)) != NULL) {
|
||||
free_subscription(sub);
|
||||
}
|
||||
}
|
||||
destroy_hashtable(&q->subscriptions);
|
||||
warn("TODO: the shovel needs to be taken down as well here\n");
|
||||
free(q);
|
||||
|
|
Loading…
Reference in New Issue