Actually clean up waiters

This commit is contained in:
Tony Garnock-Jones 2011-01-02 17:29:30 -05:00
parent 4400f8e5bb
commit b4392db109
1 changed files with 6 additions and 1 deletions

View File

@ -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);