refine dns_resolve_over_tcp