chiark / gitweb /
Do not adns_cancel in the middle of adns_forallqueries
[chiark-tcl.git] / adns / adns.c
index 14ea50ce022b1b10a91fd7b251ef03ffd3b2e06f..2a86f4aca2db743b928efb35778dc2467e90f56a 100644 (file)
@@ -305,6 +305,8 @@ static void destroy_resolver(Tcl_Interp *ip, Resolver *res) {
       adns_forallqueries_begin(res->ads);
       aqu= adns_forallqueries_next(res->ads, &query_v);
       if (!aqu) break;
+      assert(query_v->aqu == aqu);
+      query_v->aqu= 0; /* avoid disrupting the adns query list */
       asynch_query_dispose(ip, query_v);
     }
     adns_finish(res->ads);