Commit ce3decb1 by kparzysz Committed by Tianqi Chen

Fix setting up hints for getaddrinfo (#2872)

parent 6e18eb25
......@@ -65,7 +65,7 @@ struct SockAddr {
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_flags = AI_PASSIVE;
hints.ai_protocol = SOCK_STREAM;
hints.ai_socktype = SOCK_STREAM;
addrinfo *res = NULL;
int sig = getaddrinfo(host, NULL, &hints, &res);
CHECK(sig == 0 && res != NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment