Browse Source

only resolve ipv4 addr

pull/4/merge
Max Lv 11 years ago
parent
commit
94994b1951
1 changed files with 5 additions and 1 deletions
  1. 6
      src/server.c

6
src/server.c

@ -236,7 +236,11 @@ static void server_recv_cb (EV_P_ ev_io *w, int revents) {
struct addrinfo hints; struct addrinfo hints;
asyncns_query_t *query; asyncns_query_t *query;
memset(&hints, 0, sizeof hints); 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; hints.ai_socktype = SOCK_STREAM;
query = asyncns_getaddrinfo(server->listen_ctx->asyncns, query = asyncns_getaddrinfo(server->listen_ctx->asyncns,

Loading…
Cancel
Save