]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
outnet_tcp_cb: add assertion and return when write packets done is handled.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 25 Jun 2020 14:29:37 +0000 (16:29 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 25 Jun 2020 14:29:37 +0000 (16:29 +0200)
services/outside_network.c

index dad448b522fdf34d905f8b51f170d05c84631583..71a7adebd65265923e1d33c9fc8ee2cd220a7f19 100644 (file)
@@ -867,6 +867,7 @@ outnet_tcp_cb(struct comm_point* c, void* arg, int error,
                pend->c->tcp_write_pkt = NULL;
                pend->c->tcp_write_pkt_len = 0;
                /* the pend.query is already in tree_by_id */
+               log_assert(pend->query->id_node.key);
                pend->query = NULL;
                /* setup to write next packet or setup read timeout */
                if(pend->reuse.write_wait_first) {
@@ -876,6 +877,7 @@ outnet_tcp_cb(struct comm_point* c, void* arg, int error,
                } else {
                        reuse_tcp_setup_readtimeout(pend);
                }
+               return 0;
        } else if(error != NETEVENT_NOERROR) {
                verbose(VERB_QUERY, "outnettcp got tcp error %d", error);
                /* pass error below and exit */