only resolve ipv4 addr

This commit is contained in:
Max Lv
2013-04-10 10:52:02 +08:00
parent 4a0656b1c0
commit 94994b1951
+5 -1
View File
@@ -236,7 +236,11 @@ static void server_recv_cb (EV_P_ ev_io *w, int revents) {
struct addrinfo hints;
asyncns_query_t *query;
memset(&hints, 0, sizeof hints);
hints.ai_family = AF_UNSPEC;
if (atyp == 1 || atyp == 3) {
hints.ai_family = AF_INET;
} else {
hints.ai_family = AF_INET6;
}
hints.ai_socktype = SOCK_STREAM;
query = asyncns_getaddrinfo(server->listen_ctx->asyncns,