resolvers_destroy() calls fd_delete() on the UDP socket of each nameserver,
which already closes it, then calls close() on the same FD again. This
second close() fails with EBADF (visible with strace on soft-stop), and
could close an unrelated FD if the number were reused in between. Let's
just drop the redundant close().
This came with resolvers_destroy() in 2.7 (commit
e606c84fe "MINOR:
resolvers: resolvers_destroy() deinit and free a resolver"). There is no
need to backport it, though it does not hurt.
(resolvers->t &&
ha_thread_info[resolvers->t->tid].tgid == tgid))) {
fd_delete(ns->dgram->conn.t.sock.fd);
- close(ns->dgram->conn.t.sock.fd);
}
dns_ring_free(ns->dgram->ring_req);
free(ns->dgram);