agoo_conloop_destroy(agooConLoop loop) {
    agooRes	res;

    agoo_queue_cleanup(&loop->pub_queue);
    while (NULL != (res = loop->res_head)) {
	loop->res_head = res->next;
	AGOO_FREE(res);
    }
    AGOO_FREE(loop);
}
agoo_conloop_destroy(agooConLoop loop) {
    agooRes	res;

    agoo_queue_cleanup(&loop->pub_queue);
    while (NULL != (res = loop->res_head)) {
	loop->res_head = res->next;
	AGOO_FREE(res);
    }
    AGOO_FREE(loop);
}