mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
connect: make sure SOCK_STREAM set either way
This commit is contained in:
parent
c450d06413
commit
25a2ce56e2
1 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,8 @@ lws_getaddrinfo46(struct lws *wsi, const char *ads, struct addrinfo **result)
|
|||
memset(&hints, 0, sizeof(hints));
|
||||
*result = NULL;
|
||||
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
|
||||
#ifdef LWS_WITH_IPV6
|
||||
if (wsi->ipv6) {
|
||||
|
||||
|
@ -19,7 +21,6 @@ lws_getaddrinfo46(struct lws *wsi, const char *ads, struct addrinfo **result)
|
|||
#endif
|
||||
{
|
||||
hints.ai_family = PF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
}
|
||||
|
||||
return getaddrinfo(ads, NULL, &hints, result);
|
||||
|
|
Loading…
Add table
Reference in a new issue